docv/app/dashboard/documents/loading.tsx
Sadrinho27 aedd3b9f10
Some checks failed
4NK Template Sync / check-and-sync (push) Failing after 1s
first commit
2025-09-29 16:57:49 +02:00

84 lines
3.4 KiB
TypeScript

export default function DocumentsLoading() {
return (
<div className="space-y-6">
{/* Header Skeleton */}
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between">
<div>
<div className="h-8 w-48 bg-gray-200 rounded animate-pulse mb-2" />
<div className="h-4 w-64 bg-gray-200 rounded animate-pulse" />
</div>
<div className="flex items-center space-x-3 mt-4 sm:mt-0">
<div className="h-9 w-24 bg-gray-200 rounded animate-pulse" />
<div className="h-9 w-32 bg-gray-200 rounded animate-pulse" />
</div>
</div>
{/* Stats Cards Skeleton */}
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
{[...Array(4)].map((_, i) => (
<div key={i} className="bg-white border rounded-lg p-4">
<div className="flex items-center justify-between">
<div>
<div className="h-4 w-16 bg-gray-200 rounded animate-pulse mb-2" />
<div className="h-8 w-12 bg-gray-200 rounded animate-pulse" />
</div>
<div className="h-8 w-8 bg-gray-200 rounded animate-pulse" />
</div>
</div>
))}
</div>
{/* Search and Filters Skeleton */}
<div className="bg-white border rounded-lg p-4">
<div className="flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-4 lg:space-y-0">
<div className="flex flex-col sm:flex-row sm:items-center space-y-3 sm:space-y-0 sm:space-x-4">
<div className="h-10 w-80 bg-gray-200 rounded animate-pulse" />
<div className="h-10 w-20 bg-gray-200 rounded animate-pulse" />
</div>
<div className="flex items-center space-x-3">
<div className="h-10 w-32 bg-gray-200 rounded animate-pulse" />
<div className="h-10 w-20 bg-gray-200 rounded animate-pulse" />
</div>
</div>
</div>
{/* Documents List Skeleton */}
<div className="bg-white border rounded-lg">
<div className="overflow-x-auto">
<table className="w-full">
<thead className="bg-gray-50">
<tr>
{[...Array(9)].map((_, i) => (
<th key={i} className="text-left py-3 px-4">
<div className="h-4 w-20 bg-gray-200 rounded animate-pulse" />
</th>
))}
</tr>
</thead>
<tbody>
{[...Array(8)].map((_, i) => (
<tr key={i} className="border-b">
<td className="py-3 px-4">
<div className="h-4 w-4 bg-gray-200 rounded animate-pulse" />
</td>
<td className="py-3 px-4">
<div className="flex items-center space-x-3">
<div className="h-5 w-5 bg-gray-200 rounded animate-pulse" />
<div className="h-4 w-48 bg-gray-200 rounded animate-pulse" />
</div>
</td>
{[...Array(7)].map((_, j) => (
<td key={j} className="py-3 px-4">
<div className="h-4 w-16 bg-gray-200 rounded animate-pulse" />
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
)
}