"use client"; import React, { useState } from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { Activity, ArrowRight, BarChart3, CloudUpload, FolderOpen, Lock, LogOut, Menu, Shield, Terminal, X, } from "lucide-react"; import { useAuth } from "@/features/auth"; import { SITE_CONFIG } from "@/shared/config/site"; import { Button, Pill, Skeleton } from "@/shared/ui"; const TABS = [ { href: "/dashboard", label: "Tổng quan", icon: BarChart3 }, { href: "/explorer", label: "Kho tệp", icon: FolderOpen }, { href: "/activity", label: "Nhật ký", icon: Activity }, { href: "/developers", label: "API Docs", icon: Terminal }, { href: "/admin", label: "Quản trị RBAC", icon: Shield, adminOnly: true }, ] as const; export function TopCommandShell({ children }: { children: React.ReactNode }) { const pathname = usePathname(); const router = useRouter(); const { user, loading, healthOk, bucketName, isAdmin, logout } = useAuth(); const [mobileMenu, setMobileMenu] = useState(false); if (loading) { return (
Phiên làm việc chưa được xác thực. Đăng nhập để quản lý kho tệp của bạn.