Feat: auth 관련페이지 header 적용
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
import { Header } from "@/features/layout/components/header";
|
||||
import { Sidebar } from "@/features/layout/components/sidebar";
|
||||
import { createClient } from "@/utils/supabase/server";
|
||||
|
||||
export default function MainLayout({
|
||||
export default async function MainLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const supabase = await createClient();
|
||||
const {
|
||||
data: { user },
|
||||
} = await supabase.auth.getUser();
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col bg-zinc-50 dark:bg-black">
|
||||
<Header />
|
||||
<Header user={user} />
|
||||
<div className="flex flex-1">
|
||||
<Sidebar />
|
||||
<main className="flex-1 w-full p-6 md:p-8 lg:p-10">{children}</main>
|
||||
|
||||
Reference in New Issue
Block a user