261102_02_ENH: 공용 인증 쿠키 도메인 적용 조건 수정 및 외부 링크 인증 탭별 분리

This commit is contained in:
2026-11-02 15:55:25 +09:00
parent 69939f8d2b
commit cbd0a559e9
24 changed files with 187 additions and 114 deletions

View File

@@ -3,18 +3,20 @@
import { useEffect, useRef } from "react";
import { useRouter } from "next/navigation";
import { useLogoutMutation } from "@/query/auth";
import { useAuth } from "@/hooks/useAuth";
import { LoadingOverlayAdapter } from "@/components/app-shell/LoadingOverlayAdapter";
export default function LogoutPage() {
const router = useRouter();
const { hydrated } = useAuth();
const logoutMutation = useLogoutMutation();
const started = useRef(false);
useEffect(() => {
if (started.current) return;
if (!hydrated || started.current) return;
started.current = true;
void logoutMutation.mutateAsync().finally(() => router.replace("/login"));
}, [logoutMutation, router]);
}, [hydrated, logoutMutation, router]);
return <LoadingOverlayAdapter force label="로그아웃 중" />;
}