{!collapsed && group.label && (
{group.label}
)}
{group.items.map((item) => {
const isActive =
location.pathname === item.to ||
(location.pathname.startsWith(`${item.to}/`) && item.to !== "/");
return (
);
})}
))}
{isAdmin && (
{!collapsed && (
Admin
)}
{[{ to: "/admin", label: "Admin Panel", icon: "admin_panel_settings" }].map((item) => {
const isActive =
location.pathname === item.to ||
(location.pathname.startsWith(`${item.to}/`) && item.to !== "/");
return (
);
})}
)}