fix: 개발 서버 에러 수정 테스트2

This commit is contained in:
swcho
2026-01-02 15:18:06 +09:00
parent 745a7d06ea
commit e0e1bb5b1a
2 changed files with 16 additions and 26 deletions
+1 -12
View File
@@ -44,21 +44,10 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
setUserInfo(null);
const hostname = window.location.hostname;
const checkToken = getCookie(AUTH_USER_ID);
// 개발 환경에서는 localhost 도메인 사용
if (hostname === "localhost" || hostname === "127.0.0.1" || hostname === "con.mind-one.co.kr")
if (!checkToken) {
async function doLogin() {
try {
await LoginApi.login({ userId: "CLEANWATER", password: "gktneh12!@" });
window.location.href = "/map";
} catch (err) {
console.error("로그인 실패", err);
}
}
doLogin();
} else router.push("/map");
window.location.href = "/";
// 운영 환경에서는 서브도메인을 포함한 최상위 도메인 사용
// router.push는 같은 Next.js 앱 내에서만 작동하므로 다른 앱으로 이동할 때는 window.location.href 사용