From 521511f86f358bc9ae9e3b1814da5e5f61d7f8b6 Mon Sep 17 00:00:00 2001 From: Sidharth Babu <95430324+sidhuiwnl@users.noreply.github.com> Date: Sat, 29 Mar 2025 09:07:02 +0530 Subject: [PATCH] refactor: shows 0 instead of nan for new users (#140) --- .gitignore | 2 +- apps/web/src/app/(dashboard)/dashboard/dashboard-chart.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b2a2c70..7c9a2e2 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ node_modules # Testing coverage - +.idea # Turbo .turbo diff --git a/apps/web/src/app/(dashboard)/dashboard/dashboard-chart.tsx b/apps/web/src/app/(dashboard)/dashboard/dashboard-chart.tsx index bea16f8..abf08c5 100644 --- a/apps/web/src/app/(dashboard)/dashboard/dashboard-chart.tsx +++ b/apps/web/src/app/(dashboard)/dashboard/dashboard-chart.tsx @@ -239,7 +239,7 @@ const DashboardItemCard: React.FC = ({ {count} {status !== "total" ? ( -
{(percentage * 100).toFixed(0)}%
+
{count > 0 ? (percentage * 100).toFixed(0) : 0}%
) : null}