251205:0000 Just start debug backend/frontend

This commit is contained in:
2025-12-05 00:32:02 +07:00
parent dc8b80c5f9
commit 2865bebdb1
88 changed files with 6751 additions and 1016 deletions

View File

@@ -0,0 +1,30 @@
import { AdminSidebar } from "@/components/admin/sidebar";
import { redirect } from "next/navigation";
// import { getServerSession } from "next-auth"; // Commented out for now as we are mocking auth
export default async function AdminLayout({
children,
}: {
children: React.ReactNode;
}) {
// Mock Admin Check
// const session = await getServerSession();
// if (!session?.user?.roles?.some((r) => r.role_name === 'ADMIN')) {
// redirect('/');
// }
// For development, we assume user is admin
const isAdmin = true;
if (!isAdmin) {
redirect("/");
}
return (
<div className="flex h-[calc(100vh-4rem)]"> {/* Subtract header height */}
<AdminSidebar />
<div className="flex-1 overflow-auto bg-muted/10">
{children}
</div>
</div>
);
}