"use client" import { cn } from "@/lib/utils" import { LayoutGrid, BookOpen, Share2, Palette, GitFork, Building2, Users } from 'lucide-react' import { Button } from "@/components/ui/button" import { ScrollArea } from "@/components/ui/scroll-area" import { useRouter, usePathname } from 'next/navigation' interface SidebarProps extends React.HTMLAttributes { isOpen: boolean onClose: () => void } const menuItems = [ { title: "Board", icon: LayoutGrid, href: "/board", iframe: "https://example.com/board" }, { title: "Chapter", icon: BookOpen, href: "/chapter", iframe: "https://example.com/chapter" }, { title: "Flow", icon: Share2, href: "/flow", iframe: "https://example.com/flow" }, { title: "Design", icon: Palette, href: "/design", iframe: "https://example.com/design" }, { title: "GitLab", icon: GitFork, href: "/gitlab", iframe: "https://gitlab.com", badge: 1, }, { title: "CRM", icon: Building2, href: "/crm", iframe: "https://example.com/crm" }, { title: "The Great Missions", icon: Users, href: "/missions", iframe: "https://example.com/missions" }, ] export function Sidebar({ isOpen, onClose, className }: SidebarProps) { const router = useRouter() const pathname = usePathname() const handleNavigation = (href: string) => { router.push(href) onClose() } return ( <> {isOpen && (
)}
{menuItems.map((item) => ( ))}
) }