251216_01_ENH : 프로젝트에 FW User 배정 구현 및 테스트 완료

This commit is contained in:
2025-12-16 16:57:03 +09:00
parent d9775c8a1d
commit bfbf4635b3
19 changed files with 813 additions and 107 deletions

View File

@@ -17,7 +17,7 @@ import {NONE_HTTP_ERROR} from "@/const/commonConst";
const LoginPage = () => {
const searchParams = useSearchParams();
const { setFromLoginResponse } = useAuth();
const { auth, setFromLoginResponse } = useAuth();
const { withLoadingAsync } = useLoading();
const { get: getSeatNumberStorage, set: setSeatNumberStorage } = useStorage(StorageKeys.SeatNumber);
const { get: getLoginTypeStorage, set: setLoginTypeStorage } = useStorage(StorageKeys.LoginType);
@@ -61,8 +61,6 @@ const LoginPage = () => {
// 저장 실패는 치명적이지 않으므로 콘솔 로깅만
console.warn("Failed to persist SeatNumber to secure storage:", e);
}
// 메인 페이지로 이동 (보호 라우트 진입)
window.location.replace("/");
}).catch((e) => {
const err = apiError(e);
console.error(err.status, err.code, err.message);
@@ -80,6 +78,12 @@ const LoginPage = () => {
);
}
useEffect(() => {
if(auth.user){
window.location.replace("/");
}
}, [auth]);
// URL 쿼리 파라미터에서 type 수신
useEffect(() => {
const typeParam = searchParams.get("type") ?? "";