"use client"; import { useRouter } from "next/navigation"; import { IconBoxMultiple, IconPlus } from "@tabler/icons-react"; import { Badge } from "@kandev/ui/badge"; import { Button } from "@kandev/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger } from "@kandev/ui/tooltip"; import { useAppStore } from "@/components/state-provider"; import { useInOffice } from "@/hooks/use-in-office"; import { cn } from "@/lib/utils"; import { APP_SIDEBAR_SECTION_IDS } from "../app-sidebar-constants"; import { AppSidebarSection } from "../app-sidebar-section"; type ProjectsSectionProps = { collapsed: boolean; }; export function ProjectsSection({ collapsed }: ProjectsSectionProps) { const router = useRouter(); const inOffice = useInOffice(); const projects = useAppStore((s) => s.office.projects); const activeProjects = projects.filter((p) => p.status !== "archived"); if (!inOffice) return null; const headerAction = ( Add project ); return ( {activeProjects.length === 0 ? (

No projects yet

) : ( activeProjects.map((project) => { const taskCount = project.taskCounts?.total ?? 0; return ( ); }) )}
); }