import type { ReactNode } from "react"; import Link from "next/link"; import Image from "next/image"; import type { LucideIcon } from "lucide-react"; import { Separator } from "@/components/ui/separator"; import { cn } from "@/lib/utils"; type DashboardSidebarItem = { label: string; href: string; icon: LucideIcon; active?: boolean; children?: DashboardSidebarItem[]; }; type DashboardSidebarProps = { items: DashboardSidebarItem[]; top?: ReactNode; footer?: ReactNode; }; export function DashboardSidebar({ items, top, footer }: DashboardSidebarProps) { function renderItem(item: DashboardSidebarItem, nested = false) { const Icon = item.icon; return (
{item.label} {item.children?.length ? item.children.map((child) => renderItem(child, true)) : null}
); } return (
Mohs Admin

Mohs Admin

Website owner workspace

{top ?
{top}
: null}
{footer ? ( <>
{footer}
) : null}
); }