Files
vexplor/frontend/app/(main)/admin/debug/page.tsx
DDD1542 4f10b5e42d refactor: 전체 프론트엔드 하드코딩 색상 → CSS 변수 일괄 치환
447+ 파일, 4500+ 줄 변경:
- gray-* → border/bg-muted/text-foreground/text-muted-foreground
- blue-* → primary/ring
- red-* → destructive
- green-* → emerald (일관성)
- indigo-* → primary
- yellow/orange → amber (통일)
- dark mode 변형도 시맨틱 토큰으로 변환

Made-with: Cursor
2026-03-09 14:31:59 +09:00

48 lines
1.6 KiB
TypeScript

"use client";
import { useAuth } from "@/hooks/useAuth";
import { AuthGuard } from "@/components/auth/AuthGuard";
/**
* 어드민 권한 디버깅 페이지
*/
export default function AdminDebugPage() {
const { user, isLoggedIn, isAdmin, loading, error } = useAuth();
return (
<AuthGuard requireAdmin={true}>
<div className="p-6">
<h1 className="mb-4 text-2xl font-bold"> </h1>
<div className="space-y-4">
<div className="rounded bg-muted p-4">
<h2 className="mb-2 font-semibold"> </h2>
<p>: {loading ? "예" : "아니오"}</p>
<p>: {isLoggedIn ? "예" : "아니오"}</p>
<p>: {isAdmin ? "예" : "아니오"}</p>
{error && <p className="text-destructive">: {error}</p>}
</div>
{user && (
<div className="rounded bg-primary/10 p-4">
<h2 className="mb-2 font-semibold"> </h2>
<p>ID: {user.userId}</p>
<p>: {user.userName}</p>
<p>: {user.userType}</p>
<p>: {user.deptName}</p>
<p>: {user.companyCode}</p>
</div>
)}
<div className="rounded bg-emerald-100 p-4">
<h2 className="mb-2 font-semibold"> </h2>
<p>
localStorage : {typeof window !== "undefined" && localStorage.getItem("authToken") ? "존재" : "없음"}
</p>
</div>
</div>
</div>
</AuthGuard>
);
}