feat(WEB): 폴더블 기기(Galaxy Fold) 레이아웃 대응 및 CEO 대시보드 개선

- AuthenticatedLayout: visualViewport API 추가로 폴더블 기기 화면 전환 감지
- globals.css: CSS 변수(--app-width, --app-height) 및 dvw/dvh fallback 추가
- 모바일 레이아웃: h-screen → var(--app-height)로 변경
- CEO 대시보드 및 API 클라이언트 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
byeongcheolryu
2026-01-09 11:00:39 +09:00
parent 0d539628f3
commit c4412295fa
9 changed files with 255 additions and 75 deletions

View File

@@ -199,9 +199,15 @@ export async function withTokenRefresh<T>(
// Retry the original API call
return withTokenRefresh(apiCall, maxRetries - 1);
} else {
console.error('❌ Token refresh failed - redirecting to login');
// Refresh failed - redirect to login
console.error('❌ Token refresh failed - clearing cookies and redirecting to login');
// ⚠️ 무한 루프 방지: 쿠키 삭제 API 호출 후 redirect
// 쿠키가 남아있으면 미들웨어가 "인증됨"으로 판단하여 무한 루프 발생
if (typeof window !== 'undefined') {
try {
await fetch('/api/auth/logout', { method: 'POST' });
} catch {
// 로그아웃 API 실패해도 redirect 진행
}
window.location.href = '/login';
}
}