🚚 mv: change layout folder structure
Separate the navbar from the root layout, keeping the root layout clean. Create two child layout folders: 1. main: for basic layouts such as the navbar 2. clean: for clean layouts without any extra elements.
This commit is contained in:
13
app/(main)/layout.tsx
Normal file
13
app/(main)/layout.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import Navbar from "@/shared/widgets/navbar/components/Navbar";
|
||||
import React from "react";
|
||||
|
||||
const layout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||
return (
|
||||
<div className="max-w-400 mx-auto relative">
|
||||
<Navbar />
|
||||
<div className="pt-16">{children}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default layout;
|
||||
@ -30,10 +30,7 @@ export default function RootLayout({
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<div className="max-w-400 mx-auto relative">
|
||||
<Navbar />
|
||||
<div className="pt-16">{children}</div>
|
||||
</div>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user