import Link from "next/link"; import { ArrowRight, FolderKanban } from "lucide-react"; import { getWorkspace } from "@/lib/session"; import { projectStatsByProject } from "@/lib/queries/account"; import { formatDateOnly, formatNumber, formatUsd, truncate } from "@/lib/format"; import { PageHeader } from "@/components/ui/page-header"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { EmptyState } from "@/components/ui/empty-state"; import { CreateProjectDialog } from "@/components/dashboard/projects/create-project-dialog"; import { SelectProjectButton } from "@/components/dashboard/projects/project-actions"; export const dynamic = "force-dynamic"; export const metadata = { title: "Projects · Fetcha" }; export default async function ProjectsPage({ searchParams }: { searchParams: Promise<{ new?: string }> }) { const sp = await searchParams; const ws = await getWorkspace(); const stats = await projectStatsByProject(ws.organization.id); return (