Files
aycanurmimarl-k/components/LayoutContent.tsx
2026-04-17 11:16:00 +03:00

26 lines
569 B
TypeScript

'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 isAdmin = pathname?.startsWith('/admin');
const isHome = pathname === "/";
if (isAdmin) {
return <div className="flex-1">{children}</div>;
}
return (
<>
<Navbar />
<div className="flex-1">
{children}
</div>
{!isHome && <Footer />}
</>
);
}