import CreateRandomInvoiceContainer from "@/app/[lang]/dashboard/components/client/create-random-invoice/create-random-invoice"; import latestInvoicesController from "@/app/[lang]/dashboard/components/server/latest-invoices/latest-invoices-controller"; import { ArrowPathIcon } from "@heroicons/react/24/outline"; import clsx from "clsx"; import { isLeft } from "fp-ts/lib/Either"; import Image from "next/image"; export default async function LatestInvoices() { const latestInvoices = await latestInvoicesController(); if (isLeft(latestInvoices)) return
Error
; const invoices = latestInvoices.right.map((invoice, i) => (
{`${invoice.customerName}'s

{invoice.customerName}

{invoice.customerEmail}

{invoice.invoicesAmount}

)); return (

Latest Invoices

{invoices}

Updated just now

); }