import { IconType } from "react-icons"; import { LuConstruction, LuFileUp, LuFilm, LuLayoutDashboard, LuVideo, } from "react-icons/lu"; import { NavLink } from "react-router-dom"; import { Sheet, SheetContent } from "@/components/ui/sheet"; import Logo from "./Logo"; import { ENV } from "@/env"; const navbarLinks = [ { id: 1, icon: LuLayoutDashboard, title: "Dashboard", url: "/", }, { id: 2, icon: LuVideo, title: "Live", url: "/live", }, { id: 3, icon: LuFilm, title: "History", url: "/history", }, { id: 4, icon: LuFileUp, title: "Export", url: "/export", }, { id: 5, icon: LuConstruction, title: "UI Playground", url: "/playground", dev: true, }, ]; function Sidebar({ sheetOpen, setSheetOpen, }: { sheetOpen: boolean; setSheetOpen: (open: boolean) => void; }) { const sidebar = ( ); return ( <>
{sidebar}
setSheetOpen(false)} >
{sidebar}
); } type SidebarItemProps = { Icon: IconType; title: string; url: string; dev?: boolean; onClick?: () => void; }; function SidebarItem({ Icon, title, url, dev, onClick }: SidebarItemProps) { const shouldRender = dev ? ENV !== "production" : true; return ( shouldRender && ( `py-4 px-2 flex flex-col lg:flex-row items-center rounded-lg gap-2 lg:w-full hover:bg-border ${ isActive ? "font-bold bg-popover text-popover-foreground" : "" }` } >
{title}
) ); } export default Sidebar;