'use client'; import { isAdmin, getSession } from '@/lib/store/auth-store'; import { ShieldAlert, User } from 'lucide-react'; function ViewerNotice() { const session = getSession(); return (

权限不足

仅管理员可修改设置

{session && (
当前用户:{session.name} 观众
)} 返回首页
); } export function AdminGate({ children, fallback }: { children: React.ReactNode; fallback?: React.ReactNode }) { if (!isAdmin()) return fallback || ; return <>{children}; }