feat: integrate AI growth analyst experience
This commit is contained in:
11
src/lib/growth-report-state.ts
Normal file
11
src/lib/growth-report-state.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export type GrowthDisplayMode = 'loading' | 'content' | 'error';
|
||||
|
||||
export function reportDisplayMode(
|
||||
status: string | undefined,
|
||||
hasCurrentEvidence: boolean,
|
||||
hasPreviousEvidence: boolean,
|
||||
): GrowthDisplayMode {
|
||||
if (hasCurrentEvidence || hasPreviousEvidence) return 'content';
|
||||
if (status === 'QUEUED' || status === 'ANALYZING' || status === 'GENERATING') return 'loading';
|
||||
return 'error';
|
||||
}
|
||||
Reference in New Issue
Block a user