29e0e88267
- AdminLayout now uses flex-row: AdminSidebar (left) + main (right) - Removed NavBar import and max-w-5xl centered constraint - Main content area takes remaining width with px-8 py-8 padding
20 lines
510 B
TypeScript
20 lines
510 B
TypeScript
import { AdminSidebar } from "@/components/admin/AdminSidebar";
|
|
import { getServerSession } from "next-auth";
|
|
import { authOptions } from "@/lib/auth";
|
|
|
|
export default async function AdminLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const session = await getServerSession(authOptions);
|
|
return (
|
|
<div className="flex min-h-screen bg-gray-50">
|
|
{session && <AdminSidebar />}
|
|
<main className="flex-1 px-8 py-8 overflow-y-auto">
|
|
{children}
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|