feat: improved stats (#227)

This commit is contained in:
Carlos Florêncio
2026-02-16 12:00:54 +00:00
committed by GitHub
parent 212d23558a
commit fc1c328e4a
12 changed files with 729 additions and 24 deletions
+4 -2
View File
@@ -70,7 +70,7 @@ function formatPercent(value: number): string {
return `${Math.round(value)}%`;
}
type RangeKey = 'week' | 'month';
type RangeKey = 'week' | 'month' | 'all';
function getRangeLabel(range: RangeKey): string {
switch (range) {
@@ -78,6 +78,8 @@ function getRangeLabel(range: RangeKey): string {
return 'Last Week';
case 'month':
return 'Last Month';
case 'all':
return 'All Time';
default:
return 'Last Month';
}
@@ -830,7 +832,7 @@ export function StatsPageClient({ stats, error, workspaceId, activeRange }: Stat
variant="outline"
className="h-7"
>
{(['week', 'month'] as RangeKey[]).map((key) => (
{(['week', 'month', 'all'] as RangeKey[]).map((key) => (
<ToggleGroupItem
key={key}
value={key}