feat: Add loading skeletons for improved UX

- Implement loading states for dashboard, project, and video views
- Introduce skeleton UIs for settings pages
- Add skeletons for Navbar and charts
- Enhance `Skeleton` component with a text variant
- Improve perceived performance during data fetching
- Update `.gitignore` with `Optimization.md`
This commit is contained in:
Yusuf İpek
2026-02-07 15:15:02 +03:00
parent 5856c42181
commit 48ddb03995
14 changed files with 686 additions and 9 deletions
+48
View File
@@ -0,0 +1,48 @@
import { Skeleton } from "@/components/ui/skeleton"
import { Card, CardHeader, CardContent } from "@/components/ui/card"
function ProjectCardSkeleton() {
return (
<Card className="h-full">
<CardHeader>
<div className="flex items-start justify-between">
<div className="flex items-center gap-2">
<Skeleton className="h-5 w-5 rounded" />
<Skeleton className="h-5 w-32" />
</div>
<Skeleton className="h-5 w-16 rounded-full" />
</div>
<Skeleton className="h-4 w-20 rounded-full mt-1" />
<Skeleton className="h-4 w-full mt-1" />
<Skeleton className="h-4 w-2/3" />
</CardHeader>
<CardContent>
<div className="flex items-center gap-4">
<Skeleton className="h-4 w-14" />
<Skeleton className="h-4 w-8" />
<Skeleton className="h-4 w-16" />
</div>
</CardContent>
</Card>
)
}
export default function DashboardLoading() {
return (
<div className="px-6 lg:px-8 py-8 w-full">
<div className="flex items-center justify-between mb-8">
<div className="flex items-center gap-4">
<Skeleton className="h-9 w-40" />
<Skeleton className="h-9 w-[200px] rounded-md" />
</div>
<Skeleton className="h-9 w-32 rounded-md" />
</div>
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
{Array.from({ length: 6 }).map((_, i) => (
<ProjectCardSkeleton key={i} />
))}
</div>
</div>
)
}