"use client"
import { IconArrowLeft, IconFolder } from "@tabler/icons-react"
import Link from "next/link"
import { usePathname } from "next/navigation"
import {
SidebarGroup,
SidebarGroupContent,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar"
import { cn } from "@/lib/utils"
export function NavProjects({
projects,
}: {
projects: { id: string; name: string }[]
}) {
const pathname = usePathname()
const activeId = pathname?.match(
/^\/dashboard\/projects\/([^/]+)/
)?.[1]
return (
<>
Back
{projects.length === 0 ? (
No projects
) : (
projects.map((project) => (
{project.name}
))
)}
>
)
}