diff --git a/app/dashboard/(overview)/page.tsx b/app/dashboard/(overview)/page.tsx index 91c49b3..b5a8806 100644 --- a/app/dashboard/(overview)/page.tsx +++ b/app/dashboard/(overview)/page.tsx @@ -2,12 +2,11 @@ import { Card } from '@/app/ui/dashboard/cards'; import RevenueChart from '@/app/ui/dashboard/revenue-chart'; import LatestInvoices from '@/app/ui/dashboard/latest-invoices'; import { lusitana } from '@/app/ui/fonts'; -import { fetchLatestInvoices, fetchCardData} from "@/app/lib/data"; +import { fetchCardData} from "@/app/lib/data"; import { Suspense } from 'react'; -import { RevenueChartSkeleton } from '@/app/ui/skeletons'; +import {LatestInvoicesSkeleton, RevenueChartSkeleton} from '@/app/ui/skeletons'; export default async function Page() { - const latestInvoices = await fetchLatestInvoices(); const { numberOfInvoices, @@ -34,7 +33,9 @@ export default async function Page() { }> - + }> + + ); diff --git a/app/ui/dashboard/latest-invoices.tsx b/app/ui/dashboard/latest-invoices.tsx index 5fba8ea..46ee94f 100644 --- a/app/ui/dashboard/latest-invoices.tsx +++ b/app/ui/dashboard/latest-invoices.tsx @@ -3,12 +3,11 @@ import clsx from 'clsx'; import Image from 'next/image'; import { lusitana } from '@/app/ui/fonts'; import { LatestInvoice } from '@/app/lib/definitions'; -export default async function LatestInvoices({ - latestInvoices, -}: { - latestInvoices: LatestInvoice[]; -}) { - return ( +import {fetchLatestInvoices} from "@/app/lib/data"; +export default async function LatestInvoices() { + const latestInvoices = await fetchLatestInvoices(); + + return (

Latest Invoices