0 && "ml-2 border-l border-white/10 pl-2",
)}
>
{items.map((item) => {
const Icon = item.icon;
const active = isActive(item, pathname);
const hasSub = "sub" in item && item.sub;
const isOpen = openSub === item.name;
return (
{hasSub ? (
<>
{isOpen && (
)}
>
) : (
{item.name}
)}
);
})}
);
}
export function AdminNavbar({
adminShortcuts,
tierlistTypes,
tierlistVersions,
}: {
adminShortcuts: {
name: string;
url: string;
}[];
tierlistTypes: {
id: string;
name: string;
count: number;
}[];
tierlistVersions: {
id: string;
name: string;
}[];
}) {
const pathname = usePathname();
const isMobile = useIsMobile();
const [showLabels, setShowLabels] = useState(false);
const [openDropdown, setOpenDropdown] = useState