Merge remote-tracking branch 'origin/iipbs/fo/dev'

This commit is contained in:
yschoi
2025-08-10 22:36:48 +09:00
2 changed files with 11 additions and 3 deletions
+11 -1
View File
@@ -1,17 +1,27 @@
"use client"
import "./globals.css";
import { StoreProvider } from "./store";
import { LoginApi } from "@/src/entities/auth";
import { useEffect } from "react";
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
useEffect(() => {
// 렌더 중이 아니라 클라이언트에서만 실행 + 에러 캐치
void LoginApi.login({ userId: "CLEANWATER", password: "gktneh12!@" })
.catch((e) => {
console.error("Auto login failed:", e);
});
}, []);
return (
<html lang="en">
<body>
<StoreProvider>
{children}
{children}
</StoreProvider>
</body>
</html>
-2
View File
@@ -1,4 +1,3 @@
import { LoginApi } from '@/src/entities/auth/api/login-service';
import { createStore } from 'zustand/vanilla';
import { CommonReducer, commonState, type CommonStore, type CommonType } from './common';
import { dashBoardInitState, dashBoardReducer, type DashBoardStore, type DashBoardType } from './dashboard';
@@ -59,7 +58,6 @@ export const StoreZus =
}
) => {
return createStore<FoStore>()((set) => {
LoginApi.login({userId: "CLEANWATER", password: "gktneh12!@"})
return {
...initState,
...CommonReducer(set),