perf(cfdi): add skeleton loader for better perceived performance
- Replace "Cargando..." text with animated skeleton rows - Mimics table structure while loading - Improves perceived loading speed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1202,8 +1202,20 @@ export default function CfdiPage() {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
{isLoading ? (
|
||||
<div className="text-center py-8 text-muted-foreground">
|
||||
Cargando...
|
||||
<div className="space-y-3">
|
||||
{/* Skeleton loader */}
|
||||
{[...Array(8)].map((_, i) => (
|
||||
<div key={i} className="flex items-center gap-4 animate-pulse">
|
||||
<div className="h-4 bg-muted rounded w-20"></div>
|
||||
<div className="h-5 bg-muted rounded w-16"></div>
|
||||
<div className="h-4 bg-muted rounded w-12"></div>
|
||||
<div className="h-4 bg-muted rounded flex-1 max-w-[180px]"></div>
|
||||
<div className="h-4 bg-muted rounded flex-1 max-w-[180px]"></div>
|
||||
<div className="h-4 bg-muted rounded w-24 ml-auto"></div>
|
||||
<div className="h-5 bg-muted rounded w-16"></div>
|
||||
<div className="h-8 bg-muted rounded w-8"></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : data?.data.length === 0 ? (
|
||||
<div className="text-center py-8 text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user