diff --git a/components/dashboard/Chart.tsx b/components/dashboard/Chart.tsx index 8a55288..bdfa732 100644 --- a/components/dashboard/Chart.tsx +++ b/components/dashboard/Chart.tsx @@ -359,8 +359,8 @@ export default function Chart({ )}
{(() => { - const days = Math.round((new Date(dateRange.end).getTime() - new Date(dateRange.start).getTime()) / 86400000) + 1 - return days <= 1 ? 'vs yesterday' : `vs previous ${days} days` + const days = Math.round((new Date(dateRange.end).getTime() - new Date(dateRange.start).getTime()) / 86400000) + return days === 0 ? 'vs yesterday' : `vs previous ${days} days` })()}
{metric === m.key && (