refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { Skeleton } from '@/components/ui/skeleton';
|
|
|
|
|
|
|
|
|
|
export function AnalyticsViewSkeleton() {
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-8 pb-24 container py-8 animate-fadeIn">
|
|
|
|
|
<div className="flex flex-col lg:flex-row justify-between items-start lg:items-end gap-6 border-b border-white/5 pb-8">
|
|
|
|
|
<div>
|
|
|
|
|
<Skeleton className="h-10 w-64 mb-2" />
|
|
|
|
|
<Skeleton className="h-4 w-80" />
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex flex-wrap items-center gap-3">
|
2026-02-07 15:45:06 +00:00
|
|
|
<Skeleton className="h-10 w-48 rounded-[var(--radius-xl)]" />
|
refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
<div className="flex gap-2">
|
|
|
|
|
<Skeleton className="h-9 w-20" />
|
|
|
|
|
<Skeleton className="h-9 w-20" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
|
|
|
{[1, 2, 3, 4].map((i) => (
|
2026-02-07 15:45:06 +00:00
|
|
|
<Skeleton key={i} className="h-28 w-full rounded-[var(--radius-xl)]" />
|
refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
2026-02-07 15:45:06 +00:00
|
|
|
<Skeleton className="lg:col-span-2 h-80 rounded-[var(--radius-xl)]" />
|
refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
<div className="space-y-6">
|
2026-02-07 15:45:06 +00:00
|
|
|
<Skeleton className="h-56 rounded-[var(--radius-xl)]" />
|
|
|
|
|
<Skeleton className="h-44 rounded-[var(--radius-xl)]" />
|
refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-02-07 15:45:06 +00:00
|
|
|
<Skeleton className="h-96 w-full rounded-[var(--radius-xl)]" />
|
refactor(web): split AnalyticsView into analytics-view module
- types: AnalyticsViewProps, DateRangeKey, GlobalStats, TopTrackRow, TrafficSource, DeviceStats, ChartHoverData
- useAnalyticsView: dateRange, stats, topTracks, trafficSources, deviceStats, loading, hoveredData, handleExport
- AnalyticsViewHeader, AnalyticsViewKpiGrid, AnalyticsViewChart, AnalyticsViewOrigins, AnalyticsViewPlatforms, AnalyticsViewTopTracks, AnalyticsViewSkeleton
- Data via analyticsService; loading renders Skeleton
- text-[10px] -> text-xs, tracking-[0.2em] -> tracking-wide
- Stories: Default, Loading (Skeleton); decorator min-h-layout-page
- Re-export from AnalyticsView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 17:33:42 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|