diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 441d34c7..63782aee 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -7,7 +7,7 @@ import { logout } from '@services/authService'; import useToast from '@hooks/useToast'; export default function Header() { - const { userInfo: userInfoData, onLogout, clearUserInfo } = useStore(); + const { userInfo: userInfoData, onLogout, clearUserInfo, isAuthenticated } = useStore(); const navigate = useNavigate(); const { toastSuccess } = useToast(); @@ -33,7 +33,9 @@ export default function Header() { diff --git a/src/mocks/services/authServiceHandler.ts b/src/mocks/services/authServiceHandler.ts index eba1bea5..73f10265 100644 --- a/src/mocks/services/authServiceHandler.ts +++ b/src/mocks/services/authServiceHandler.ts @@ -278,16 +278,9 @@ const authServiceHandler = [ // 로그아웃 API http.post(`${BASE_URL}/user/logout`, async ({ cookies }) => { - const { refreshToken, refreshTokenExpiresAt } = cookies; + const { refreshToken } = cookies; const currentTime = Date.now(); - if (!refreshToken || !refreshTokenExpiresAt) { - return HttpResponse.json( - { message: '리프레시 토큰이 유효하지 않습니다. 다시 로그인해 주세요.' }, - { status: 401 }, - ); - } - return new HttpResponse(null, { status: 200, headers: {