Chapter 9 - stream 2nd component (exercise)

This commit is contained in:
2024-01-02 18:20:17 +01:00
parent 1824c019ab
commit 67e324acae
2 changed files with 10 additions and 10 deletions

View File

@@ -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 (
<div className="flex w-full flex-col md:col-span-4">
<h2 className={`${lusitana.className} mb-4 text-xl md:text-2xl`}>
Latest Invoices