"use client"; import Image from "next/image"; import React, { useState } from "react"; import { Button } from "../ui/button"; import { cn } from "@/lib/utils"; import { ArrowLeftRightIcon, ArrowLeftToLineIcon, ArrowRightToLine, ArrowRightToLineIcon, CalendarIcon, CircleDollarSignIcon, FileTextIcon, LayoutGridIcon, LineChartIcon, LogOutIcon, Mail, PersonStanding, PersonStandingIcon, RocketIcon, Settings, SettingsIcon, } from "lucide-react"; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "../ui/command"; import { useRouter } from "next/navigation"; function Sidebar() { const [isCollapsed, setIsCollapsed] = useState(false); const router = useRouter(); const handleClick = (redirectLink: any) => { router.push(redirectLink); }; const menuList = [ { group: "Navigation", items: [ { link: "/", icon: , text: "Dashboard", }, { link: "/calendar", icon: , text: "Calendar", }, { link: "/porfolio", icon: , text: "Portfolio", }, ], }, { group: "Apple Inc", items: [ { link: "/", icon: , text: "Earnings", }, { link: "/", icon: , text: "Insider Trades", }, { link: "/", icon: , text: "Filings", }, ], }, ]; return (
{isCollapsed ? ( yellowbird ) : ( yellowbird )}
{menuList.map((menu: any, key: number) => ( <>
{!isCollapsed && menu.group}
{menu.items.map((option: any, optionKey: number) => (
handleClick(option.link)} >
{option.icon}
{!isCollapsed && ( {option.text} )}
))}

))}
{!isCollapsed && ( <>

Dylan Benzi

dylanbenzi@gmail.com

)}
); } export default Sidebar;