chore(admin): temporarily disable upload feature
This commit is contained in:
@@ -24,6 +24,7 @@ interface NavItem {
|
||||
label: string;
|
||||
icon: LucideIcon;
|
||||
isActive: (pathname: string) => boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const NAV_ITEMS: NavItem[] = [
|
||||
@@ -50,6 +51,7 @@ const NAV_ITEMS: NavItem[] = [
|
||||
label: "Upload",
|
||||
icon: Upload,
|
||||
isActive: (pathname) => pathname.startsWith("/admin/upload"),
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
href: "/admin/login",
|
||||
@@ -99,14 +101,21 @@ export function AdminShell({
|
||||
<SidebarGroup>
|
||||
<SidebarGroupContent>
|
||||
<SidebarMenu>
|
||||
{NAV_ITEMS.map(({ href, label, icon: Icon, isActive }) => (
|
||||
{NAV_ITEMS.map(({ href, label, icon: Icon, isActive, disabled }) => (
|
||||
<SidebarMenuItem key={href}>
|
||||
<SidebarMenuButton asChild isActive={isActive(pathname)}>
|
||||
<Link href={href}>
|
||||
{disabled ? (
|
||||
<SidebarMenuButton disabled tooltip={`${label} temporarily disabled`}>
|
||||
<Icon className="w-4 h-4" />
|
||||
<span>{label}</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuButton>
|
||||
) : (
|
||||
<SidebarMenuButton asChild isActive={isActive(pathname)}>
|
||||
<Link href={href}>
|
||||
<Icon className="w-4 h-4" />
|
||||
<span>{label}</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
)}
|
||||
</SidebarMenuItem>
|
||||
))}
|
||||
</SidebarMenu>
|
||||
|
||||
Reference in New Issue
Block a user