import "../styles/globals.scss"; import "../styles/variables_colors.scss"; import "../styles/variables.scss"; import Nav from "./Nav"; import Footer from "./Footer"; import { Category } from "@prisma/client"; import urlJoin from "url-join"; import { apiUrl } from "./global"; async function getCategories(): Promise { const result: Response = await fetch(urlJoin(apiUrl, `categories`), { cache: "force-cache", next: { revalidate: 3600 }, }); return await result.json(); } export default async function RootLayout({ children }: { children: React.ReactNode }) { return (

If admin logged in create a small header here app/layout.tsx

{children}