update
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
BanknotesIcon,
|
||||
ClockIcon,
|
||||
UserGroupIcon,
|
||||
InboxIcon,
|
||||
} from '@heroicons/react/24/outline';
|
||||
import { lusitana } from '@/app/ui/fonts';
|
||||
import { fetchCardData } from '@/app/lib/data';
|
||||
UserGroupIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { fetchCardData } from "@/app/lib/data";
|
||||
import { lusitana } from "@/app/ui/fonts";
|
||||
|
||||
const iconMap = {
|
||||
collected: BanknotesIcon,
|
||||
@@ -21,7 +21,7 @@ export default async function CardWrapper() {
|
||||
totalPaidInvoices,
|
||||
totalPendingInvoices,
|
||||
} = await fetchCardData();
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card title="Collected" value={totalPaidInvoices} type="collected" />
|
||||
@@ -43,7 +43,7 @@ export function Card({
|
||||
}: {
|
||||
title: string;
|
||||
value: number | string;
|
||||
type: 'invoices' | 'customers' | 'pending' | 'collected';
|
||||
type: "invoices" | "customers" | "pending" | "collected";
|
||||
}) {
|
||||
const Icon = iconMap[type];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user