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-gray-50 flex items-center justify-center px-4">
|
||
|
|
<div className="bg-white 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-gray-900 mb-2">접근이 거부되었습니다</h1>
|
||
|
|
<p className="text-gray-500 text-sm mb-6">
|
||
|
|
계정이 {user.status === 'REJECTED' ? '거절' : '비활성화'}되었습니다.
|
||
|
|
<br />
|
||
|
|
관리자에게 문의하세요.
|
||
|
|
</p>
|
||
|
|
<button
|
||
|
|
onClick={logout}
|
||
|
|
className="text-sm text-blue-600 hover:text-blue-800 cursor-pointer"
|
||
|
|
>
|
||
|
|
다른 계정으로 로그인
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|