Files
vercel_dashboard_example/app/dashboard/(overview)/page.tsx
T
claude 93f7061c53 fix: resolve build failures
- Fix TypeScript type error in deleteInvoice server action (returned
  {message: string} instead of void, incompatible with form action type)
- Add export const dynamic = "force-dynamic" to dashboard pages that
  make DB calls at build time (/dashboard, /dashboard/invoices,
  /dashboard/invoices/create) to prevent failed static prerendering
- Fix import order in customers/page.tsx (export before import was invalid)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-12 14:52:47 +00:00

41 lines
1.1 KiB
TypeScript

import type { Metadata } from "next";
import { Suspense } from "react";
import CardWrapper from "@/app/ui/dashboard/cards";
import LatestInvoices from "@/app/ui/dashboard/latest-invoices";
import RevenueChart from "@/app/ui/dashboard/revenue-chart";
import { lusitana } from "@/app/ui/fonts";
import {
CardSkeleton,
LatestInvoicesSkeleton,
RevenueChartSkeleton,
} from "@/app/ui/skeletons";
export const dynamic = "force-dynamic";
export const metadata: Metadata = {
title: "Dashboard",
};
export default async function Page() {
return (
<main>
<h1 className={`${lusitana.className} mb-4 text-xl md:text-2xl`}>
Dashboard
</h1>
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-4">
<Suspense fallback={<CardSkeleton />}>
<CardWrapper />
</Suspense>
</div>
<div className="mt-6 grid grid-cols-1 gap-6 md:grid-cols-4 lg:grid-cols-8">
<Suspense fallback={<RevenueChartSkeleton />}>
<RevenueChart />
</Suspense>
<Suspense fallback={<LatestInvoicesSkeleton />}>
<LatestInvoices />
</Suspense>
</div>
</main>
);
}