issue #33
All checks were successful
Test CI / build (push) Successful in 15s

- 로그인 버튼 비활성화 오류 해결
- 로그인 요칭 및 응답에 따른 토스트 구현
This commit is contained in:
2025-11-30 18:20:47 +09:00
parent 49cda54644
commit 877bbc582e
10 changed files with 72 additions and 38 deletions

View File

@@ -3,21 +3,40 @@ import { Outlet } from "react-router-dom";
import { SidebarProvider } from "@/components/ui/sidebar";
import Header from "@/ui/component/Header";
import { useAuthStore } from '@/store/authStore';
import { Toaster, type ToasterProps } from "sonner";
import {
CircleCheckIcon,
InfoIcon,
Loader2Icon,
OctagonXIcon,
TriangleAlertIcon,
} from "lucide-react";
export default function Layout() {
const { authData } = useAuthStore();
return (
<SidebarProvider
defaultOpen={false}
id="root"
>
<SideBar />
<div className="flex flex-col w-full h-full">
{ authData?.isLogedIn ? <Header /> : null}
{/* <Header /> */}
<Outlet />
</div>
</SidebarProvider>
<>
<Toaster
position="top-center"
icons={{
success: <CircleCheckIcon className="size-4" fill="#15b815" color="white" />,
error: <OctagonXIcon className="size-4" fill="#f14e4e" color="white" />,
info: <InfoIcon className="size-4" fill="black" color="white" />,
warning: <TriangleAlertIcon className="size-4" fill="#ffd500" color="white" />,
loading: <Loader2Icon className="size-4 animate-spin" fill="white" color="black" />
}}
/>
<SidebarProvider
defaultOpen={false}
id="root"
>
<SideBar />
<div className="flex flex-col w-full h-full">
{ authData?.isLogedIn ? <Header /> : null}
{/* <Header /> */}
<Outlet />
</div>
</SidebarProvider>
</>
);
}