From 00bb1a46dc510a7a1d2f18fea130f3093ede3616 Mon Sep 17 00:00:00 2001 From: Ardeman Date: Sat, 15 Mar 2025 19:45:14 +0800 Subject: [PATCH] refactor: remove counter property from CardReport and dashboard data for simplification --- app/components/ui/card-report.tsx | 8 +------- app/pages/dashboard/data.ts | 2 -- app/pages/dashboard/index.tsx | 3 +-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/components/ui/card-report.tsx b/app/components/ui/card-report.tsx index bc45c03..464ade6 100644 --- a/app/components/ui/card-report.tsx +++ b/app/components/ui/card-report.tsx @@ -10,11 +10,10 @@ type CardReportProperty = { properties: React.JSX.IntrinsicAttributes & React.SVGProps, ) => JSX.Element url?: string - counter?: number[] } export const CardReport = (properties: CardReportProperty) => { - const { title, amount, icon: Icon, counter, currency } = properties + const { title, amount, icon: Icon, currency } = properties return (
@@ -32,11 +31,6 @@ export const CardReport = (properties: CardReportProperty) => {

- {counter?.length && ( -
- Pribadi: {counter[0]} | Perusahaan: {counter[1]} -
- )} ) } diff --git a/app/pages/dashboard/data.ts b/app/pages/dashboard/data.ts index ec4a859..4ea967b 100644 --- a/app/pages/dashboard/data.ts +++ b/app/pages/dashboard/data.ts @@ -17,12 +17,10 @@ export const HISTORY = [ title: 'Total Content Biasa', amount: 2890, icon: GraphIcon, - counter: [2190, 700], }, { title: 'Total Content Premium', amount: 274, icon: DoctorIcon, - counter: [211, 54], }, ] diff --git a/app/pages/dashboard/index.tsx b/app/pages/dashboard/index.tsx index aaaa335..3a35e89 100644 --- a/app/pages/dashboard/index.tsx +++ b/app/pages/dashboard/index.tsx @@ -34,13 +34,12 @@ export const DashboardPage = () => {
- {HISTORY.map(({ title, amount, icon, counter }, index) => ( + {HISTORY.map(({ title, amount, icon }, index) => ( ))}