fix(WEB): 토큰 만료 시 무한 로딩 대신 로그인 리다이렉트 처리

- 52개 이상의 컴포넌트에 isNextRedirectError 처리 추가
- Server Action의 redirect() 에러가 catch 블록에서 삼켜지는 문제 해결
- access_token + refresh_token 모두 만료 시 정상적으로 로그인 페이지로 리다이렉트

수정된 영역:
- accounting: 10개 컴포넌트
- production: 12개 컴포넌트
- hr: 5개 컴포넌트
- settings: 8개 컴포넌트
- approval: 5개 컴포넌트
- items: 20개+ 컴포넌트
- board: 5개 컴포넌트
- quality: 4개 컴포넌트
- material, outbound, quotes 등 기타 컴포넌트

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
byeongcheolryu
2026-01-11 17:19:11 +09:00
parent 8bc4b90fe9
commit e56b7d53a4
131 changed files with 3320 additions and 1979 deletions

View File

@@ -16,6 +16,7 @@ import {
EyeOff,
ArrowRight
} from "lucide-react";
import { isNextRedirectError } from '@/lib/utils/redirect-error';
export function LoginPage() {
const router = useRouter();
@@ -136,6 +137,7 @@ export function LoginPage() {
// 대시보드로 이동
router.push("/dashboard");
} catch (err) {
if (isNextRedirectError(err)) throw err;
// 상세 에러 로깅
console.error('❌ 로그인 실패:', err);
if (err instanceof Error) {

View File

@@ -21,6 +21,7 @@ import {
FileText
} from "lucide-react";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { isNextRedirectError } from '@/lib/utils/redirect-error';
export function SignupPage() {
const router = useRouter();
@@ -188,6 +189,7 @@ export function SignupPage() {
router.push("/login?registered=true");
} catch (err) {
if (isNextRedirectError(err)) throw err;
console.error('Signup error:', err);
setError('Network error. Please try again.');
setIsLoading(false);