cleanup(profile): 移除调试面板
This commit is contained in:
@@ -24,7 +24,6 @@ import { Button } from "../components/ui/button";
|
||||
import { Card } from "../components/ui/card";
|
||||
import { Badge } from "../components/ui/badge";
|
||||
import { useUser, getPregnancyStage } from "../context/UserContext";
|
||||
import { isDebug, getDebugLogs } from "../services/debug";
|
||||
|
||||
interface UserInfo {
|
||||
name: string;
|
||||
@@ -237,23 +236,8 @@ export function ProfilePage() {
|
||||
</div>
|
||||
);
|
||||
|
||||
// 🐞 调试面板(VITE_DEBUG=true 时显示)
|
||||
const [debugLog] = useState<string[]>(() => isDebug() ? getDebugLogs() : []);
|
||||
const [showDebug, setShowDebug] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="min-h-dvh bg-morandi-50 pb-20">
|
||||
{/* 🐞 调试面板 */}
|
||||
{debugLog.length > 0 && (
|
||||
<div className="bg-black/80 text-white text-xs font-mono p-3">
|
||||
<button onClick={() => setShowDebug(!showDebug)} className="text-yellow-400 font-bold mb-1">
|
||||
🐞 {showDebug ? '收起' : '展开'}调试日志 ({debugLog.length}条)
|
||||
</button>
|
||||
{showDebug && debugLog.map((line, i) => (
|
||||
<div key={i} className="text-green-300 break-all">{line}</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{/* 顶部导航 */}
|
||||
<div className="bg-white border-b border-gray-100 sticky top-0 z-10">
|
||||
<div className="mx-auto px-4 py-4 flex items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user