Files
vexplor/frontend/app/(main)/admin/debug-simple/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

60 lines
1.8 KiB
TypeScript

"use client";
import { useEffect, useState } from "react";
/**
* 간단한 토큰 디버깅 페이지
*/
export default function SimpleDebugPage() {
const [tokenInfo, setTokenInfo] = useState<any>({});
useEffect(() => {
const token = localStorage.getItem("authToken");
const info = {
hasToken: !!token,
tokenLength: token ? token.length : 0,
tokenStart: token ? token.substring(0, 30) + "..." : "없음",
currentUrl: window.location.href,
timestamp: new Date().toISOString(),
};
setTokenInfo(info);
console.log("토큰 정보:", info);
}, []);
return (
<div className="p-6">
<h1 className="mb-4 text-2xl font-bold"> </h1>
<div className="space-y-4">
<div className="rounded bg-emerald-100 p-4">
<h2 className="mb-2 font-semibold"> </h2>
<p> : {tokenInfo.hasToken ? "✅ 예" : "❌ 아니오"}</p>
<p> : {tokenInfo.tokenLength}</p>
<p> : {tokenInfo.tokenStart}</p>
</div>
<div className="rounded bg-primary/10 p-4">
<h2 className="mb-2 font-semibold"> </h2>
<p> URL: {tokenInfo.currentUrl}</p>
<p>: {tokenInfo.timestamp}</p>
</div>
<div className="rounded bg-amber-100 p-4">
<h2 className="mb-2 font-semibold"> </h2>
<button
onClick={() => {
const token = localStorage.getItem("authToken");
alert(`토큰: ${token ? "존재" : "없음"}\n길이: ${token ? token.length : 0}`);
}}
className="rounded bg-primary px-4 py-2 text-white hover:bg-primary"
>
</button>
</div>
</div>
</div>
);
}