diff --git a/app/components/ui/card-report.tsx b/app/components/ui/card-report.tsx index a201e7a..0f2455e 100644 --- a/app/components/ui/card-report.tsx +++ b/app/components/ui/card-report.tsx @@ -5,6 +5,7 @@ import { formatNumberWithPeriods } from '~/utils/formatter' type CardReportProperty = { title: string amount: number + currency?: string icon: ( properties: React.JSX.IntrinsicAttributes & React.SVGProps, ) => JSX.Element @@ -13,7 +14,7 @@ type CardReportProperty = { } export const CardReport = (properties: CardReportProperty) => { - const { title, amount, icon: Icon, counter } = properties + const { title, amount, icon: Icon, counter, currency } = properties return (
@@ -22,15 +23,17 @@ export const CardReport = (properties: CardReportProperty) => { height={48} width={48} /> -
+

{title}

- Rp. {formatNumberWithPeriods(amount)} + {currency + ? `${currency} ${formatNumberWithPeriods(amount)}` + : formatNumberWithPeriods(amount)}

{counter?.length && ( -
+
Pribadi: {counter[0]} | Perusahaan: {counter[1]}
)} diff --git a/app/components/ui/chart.tsx b/app/components/ui/chart.tsx index e4bcfa3..25c38dd 100644 --- a/app/components/ui/chart.tsx +++ b/app/components/ui/chart.tsx @@ -215,7 +215,7 @@ export const ChartSubscription = () => {

Subscription Selesai

-
+
{
- {REPORT.map(({ title, amount, icon }, index) => ( + {REPORT.map(({ title, amount, icon, currency }, index) => ( ))}
@@ -49,19 +50,15 @@ export const DashboardPage = () => {
-
-
-
-
- -
+
+
+
+
-
-
-
- -
+
+
+