Initial commit: EduBox V2 platform

This commit is contained in:
root
2026-06-06 19:55:41 +00:00
commit 0a73a70820
69 changed files with 5634 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { getServerSession } from "next-auth/next";
import { authOptions } from "@/lib/auth-config";
import { redirect } from "next/navigation";
import DashboardNav from "./DashboardNav";
export const dynamic = "force-dynamic";
export default async function DashboardLayout({ children }: { children: React.ReactNode }) {
const session = await getServerSession(authOptions);
if (!session?.user) redirect("/login");
return (
<div className="flex min-h-screen bg-gray-50">
<DashboardNav role={session.user.role} />
<main className="flex-1 p-6 overflow-auto">{children}</main>
</div>
);
}