mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-05-08 09:38:55 -04:00
cf4ef928b8
- Remove unused imports from page.tsx, clients/page.tsx, invoices/page.tsx - Remove unused imports from invoice-form.tsx, invoice-workspace.tsx - Move CustomTooltip outside component in revenue-chart.tsx (fixes react-hooks/static-components) - Fix type safety in umami.ts (any -> unknown) - Fix type safety in sidebar-provider.tsx (add type assertion) - Add no-op comments to empty fallback functions in animation-preferences-provider.tsx - Fix type safety in invoice-workspace.tsx (any[] -> typed array) Note: dashboard/page.tsx still has ~55 type safety warnings related to 'any' types in stats/invoice data. These are pre-existing and would require significant refactoring of the dashboard data flow to properly type. TypeScript compilation passes.
47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import Link from "next/link";
|
|
import { Suspense } from "react";
|
|
import { api, HydrateClient } from "~/trpc/server";
|
|
import { Button } from "~/components/ui/button";
|
|
import { PageHeader } from "~/components/layout/page-header";
|
|
import { Plus, Upload } from "lucide-react";
|
|
import { InvoicesDataTable } from "./_components/invoices-data-table";
|
|
import { DataTableSkeleton } from "~/components/data/data-table";
|
|
|
|
// Invoices Table Component
|
|
async function InvoicesTable() {
|
|
const invoices = await api.invoices.getAll();
|
|
|
|
return <InvoicesDataTable invoices={invoices} />;
|
|
}
|
|
|
|
export default async function InvoicesPage() {
|
|
return (
|
|
<div className="page-enter space-y-6">
|
|
<PageHeader
|
|
title="Invoices"
|
|
description="Manage your invoices and track payments"
|
|
variant="gradient"
|
|
>
|
|
<Button asChild variant="outline" className="hover-lift shadow-sm">
|
|
<Link href="/dashboard/invoices/import">
|
|
<Upload className="mr-2 h-5 w-5" />
|
|
<span>Import CSV</span>
|
|
</Link>
|
|
</Button>
|
|
<Button asChild variant="default" className="hover-lift shadow-md">
|
|
<Link href="/dashboard/invoices/new">
|
|
<Plus className="mr-2 h-5 w-5" />
|
|
<span>Create Invoice</span>
|
|
</Link>
|
|
</Button>
|
|
</PageHeader>
|
|
|
|
<HydrateClient>
|
|
<Suspense fallback={<DataTableSkeleton columns={7} rows={5} />}>
|
|
<InvoicesTable />
|
|
</Suspense>
|
|
</HydrateClient>
|
|
</div>
|
|
);
|
|
}
|