Add skeleton loading states across all tracking pages
- Replace CircularProgress spinners with content-aware skeleton screens - Add FormSkeleton for form loading states (feeding, sleep, diaper pages) - Add ActivityListSkeleton for recent activities loading - Improves perceived performance with layout-matching placeholders 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import { AppShell } from '@/components/layouts/AppShell/AppShell';
|
||||
import { ProtectedRoute } from '@/components/common/ProtectedRoute';
|
||||
import { ErrorBoundary } from '@/components/common/ErrorBoundary';
|
||||
import { ChartErrorFallback } from '@/components/common/ErrorFallbacks';
|
||||
import { StatGridSkeleton, ChartSkeleton } from '@/components/common/LoadingSkeletons';
|
||||
import {
|
||||
TrendingUp,
|
||||
Hotel,
|
||||
@@ -102,15 +103,14 @@ export default function AnalyticsPage() {
|
||||
return (
|
||||
<ProtectedRoute>
|
||||
<AppShell>
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
minHeight: '60vh',
|
||||
}}
|
||||
>
|
||||
<CircularProgress />
|
||||
<Box>
|
||||
<Typography variant="h4" gutterBottom fontWeight="600" sx={{ mb: 3 }}>
|
||||
Analytics & Insights
|
||||
</Typography>
|
||||
<StatGridSkeleton count={3} />
|
||||
<Box sx={{ mt: 4 }}>
|
||||
<ChartSkeleton height={350} />
|
||||
</Box>
|
||||
</Box>
|
||||
</AppShell>
|
||||
</ProtectedRoute>
|
||||
|
||||
Reference in New Issue
Block a user