- 테마 시스템: CSS 변수 + data-theme + Tailwind v4 시맨틱 색상 (다크모드 지원) - 공통 컴포넌트: CodeBlock, Alert, StepGuide, CopyButton, TableOfContents - 가이드 콘텐츠 8개 섹션 (React.lazy 동적 로딩, 실제 인프라 검증 완료) - 관리자 페이지 4개 (사용자/롤/권한/통계) - 레이아웃: 반응형 사이드바 + 테마 토글 + ScrollSpy 목차 - 인증: Google OAuth 로그인/세션복원/로그아웃 백엔드 API 연동 - 개발모드 mock 인증 (import.meta.env.DEV 전용) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.4 KiB
TypeScript
34 lines
1.4 KiB
TypeScript
import { useAuth } from '../auth/useAuth';
|
|
import { Navigate } from 'react-router';
|
|
|
|
export function DeniedPage() {
|
|
const { user, logout } = useAuth();
|
|
|
|
if (!user) return <Navigate to="/login" replace />;
|
|
if (user.status === 'ACTIVE') return <Navigate to="/" replace />;
|
|
|
|
return (
|
|
<div className="min-h-screen bg-bg-primary flex items-center justify-center px-4">
|
|
<div className="bg-surface rounded-2xl shadow-lg p-10 max-w-md w-full text-center">
|
|
<div className="w-16 h-16 bg-red-100 rounded-full mx-auto mb-4 flex items-center justify-center">
|
|
<svg className="w-8 h-8 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636" />
|
|
</svg>
|
|
</div>
|
|
<h1 className="text-xl font-bold text-text-primary mb-2">접근이 거부되었습니다</h1>
|
|
<p className="text-text-muted text-sm mb-6">
|
|
계정이 {user.status === 'REJECTED' ? '거절' : '비활성화'}되었습니다.
|
|
<br />
|
|
관리자에게 문의하세요.
|
|
</p>
|
|
<button
|
|
onClick={logout}
|
|
className="text-sm text-link hover:text-accent-hover cursor-pointer"
|
|
>
|
|
다른 계정으로 로그인
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|