diff --git a/src/cli.ts b/src/cli.ts index c280584..bf3eaf6 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -44,7 +44,7 @@ function getDateRange(period: string): { range: DateRange; label: string } { } } -function toPeriod(s: string): 'today' | 'week' | 'month' | '30days' { +function toPeriod(s: string): 'today' | 'week' | '30days' | 'month' { if (s === 'today') return 'today' if (s === 'month') return 'month' if (s === '30days') return '30days' diff --git a/src/dashboard.tsx b/src/dashboard.tsx index 11e4a5d..4efe0b0 100644 --- a/src/dashboard.tsx +++ b/src/dashboard.tsx @@ -571,7 +571,7 @@ function StaticDashboard({ projects, period }: { projects: ProjectSummary[]; per ) } -export async function renderDashboard(period: 'today' | 'week' | 'month' | '30days' = 'week', provider: string = 'all'): Promise { +export async function renderDashboard(period: Period = 'week', provider: string = 'all'): Promise { await loadPricing() const range = getDateRange(period) const projects = await parseAllSessions(range, provider)