2026-02-05 15:56:41 +09:00
|
|
|
import { Header } from "@/features/layout/components/header";
|
|
|
|
|
import { Sidebar } from "@/features/layout/components/sidebar";
|
2026-02-06 09:14:49 +09:00
|
|
|
import { createClient } from "@/utils/supabase/server";
|
2026-02-05 15:56:41 +09:00
|
|
|
|
2026-02-06 09:14:49 +09:00
|
|
|
export default async function MainLayout({
|
2026-02-05 15:56:41 +09:00
|
|
|
children,
|
|
|
|
|
}: {
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}) {
|
2026-02-06 09:14:49 +09:00
|
|
|
const supabase = await createClient();
|
|
|
|
|
const {
|
|
|
|
|
data: { user },
|
|
|
|
|
} = await supabase.auth.getUser();
|
|
|
|
|
|
2026-02-05 15:56:41 +09:00
|
|
|
return (
|
|
|
|
|
<div className="flex min-h-screen flex-col bg-zinc-50 dark:bg-black">
|
2026-02-06 09:14:49 +09:00
|
|
|
<Header user={user} />
|
2026-02-05 15:56:41 +09:00
|
|
|
<div className="flex flex-1">
|
|
|
|
|
<Sidebar />
|
|
|
|
|
<main className="flex-1 w-full p-6 md:p-8 lg:p-10">{children}</main>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|