Files
twotalesanimation 3ae0a6e32f
Deploy / deploy (push) Failing after 1m53s
Storyboard Feature
2026-07-22 12:38:26 +02:00

30 lines
861 B
TypeScript

import { auth } from "@/auth";
import { redirect } from "next/navigation";
import { Sidebar } from "@/components/layout/Sidebar";
import { Header } from "@/components/layout/Header";
export default async function DashboardLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await auth();
if (!session?.user) redirect("/login");
return (
<div className="flex h-screen bg-zinc-950 overflow-hidden print:block print:h-auto print:overflow-visible">
<div className="print:hidden">
<Sidebar />
</div>
<div className="flex-1 flex flex-col overflow-hidden print:block print:overflow-visible">
<div className="print:hidden">
<Header />
</div>
<main className="flex-1 overflow-auto print:overflow-visible">
{children}
</main>
</div>
</div>
);
}