feat: complete MVP foundation auth and dashboard

This commit is contained in:
2026-06-04 09:05:40 +02:00
parent 20615e12a1
commit df7a955736
32 changed files with 880 additions and 139 deletions

25
app/dashboard/layout.tsx Normal file
View File

@@ -0,0 +1,25 @@
import { redirect } from "next/navigation";
import { DashboardSidebar } from "@/components/dashboard-sidebar";
import { getCurrentMockSession } from "@/lib/mock-session";
import { getDashboardRedirectPath } from "@/lib/route-guards";
export default async function DashboardLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await getCurrentMockSession();
const redirectPath = getDashboardRedirectPath(session);
if (redirectPath || !session) {
redirect(redirectPath ?? "/");
}
return (
<div className="min-h-dvh bg-background md:flex">
<DashboardSidebar session={session} />
<div className="min-w-0 flex-1">{children}</div>
</div>
);
}