b
This commit is contained in:
20
components/LayoutContent.tsx
Normal file
20
components/LayoutContent.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
'use client'
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
import Navbar from "@/components/Navbar";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
export default function LayoutContent({ children }: { children: React.ReactNode }) {
|
||||
const pathname = usePathname();
|
||||
const isHome = pathname === "/";
|
||||
|
||||
return (
|
||||
<>
|
||||
<Navbar />
|
||||
<div className="flex-1">
|
||||
{children}
|
||||
</div>
|
||||
{!isHome && <Footer />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user