Main Layout

Basic Layout Structure

General nextjs component structure of the Velvet template.

Root:shared/layout-components/layout/contentlayout

Nowa Layout Structure

The following _app.js 'All layouts present in the project will be listed in the _app.js file, and those layouts can be used globally in all companies utilizing the project'

Example Dashboard.layout = "Contentlayout"

Root:pages/_app.js


	import "../styles/globals.scss";
	import Contentlayout from "@/shared/layout-components/layout/contentlayout";
	import Authenticationlayout from "@/shared/layout-components/layout/authenticationlayout";
	import Landinglayout from "@/shared/layout-components/layout/landinglayout";
	
	const layouts = {
		Contentlayout: Contentlayout,
		Authenticationlayout: Authenticationlayout,
		Landinglayout: Landinglayout,
	};
	function App({ Component, pageProps }) {
		const Layout = layouts[Component.layout] || ((pageProps) =><Component>{pageProps}</Component>);
		return (
			<Layout>
			<Component {...pageProps} />
			</Layout>
		);
	}
	export default App;