gc-guide/src/pages/DeniedPage.tsx

34 lines
1.4 KiB
TypeScript
Raw Normal View 히스토리

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>
);
}