funktechnik-schubert-website/components/SiteFrame.tsx
2026-07-03 22:25:04 +02:00

21 lines
483 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
import type { ReactNode } from "react";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
export default function SiteFrame({ children }: { children: ReactNode }) {
const pathname = usePathname();
const isAdmin = pathname.startsWith("/admin");
if (isAdmin) return <>{children}</>;
return (
<>
<Header />
<main>{children}</main>
<Footer />
</>
);
}