fix(checklists): adiciona skeleton de carregamento na lista de templates
All checks were successful
CI/CD Web + Desktop / Detect changes (push) Successful in 5s
CI/CD Web + Desktop / Deploy (VPS Linux) (push) Successful in 3m6s
CI/CD Web + Desktop / Deploy Convex functions (push) Has been skipped
Quality Checks / Lint, Test and Build (push) Successful in 3m22s

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rever-tecnologia 2025-12-18 09:10:47 -03:00
parent ce52a4393b
commit d6188fd384

View file

@ -18,6 +18,7 @@ import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { SearchableCombobox, type SearchableComboboxOption } from "@/components/ui/searchable-combobox"
import { Switch } from "@/components/ui/switch"
import { Skeleton } from "@/components/ui/skeleton"
import { Textarea } from "@/components/ui/textarea"
type ChecklistItemType = "checkbox" | "question"
@ -496,7 +497,27 @@ export function ChecklistTemplatesManager() {
</CardHeader>
<CardContent>
{!templates ? (
<p className="text-sm text-neutral-600">Carregando templates...</p>
<div className="space-y-3">
{Array.from({ length: 4 }).map((_, index) => (
<div key={`template-skeleton-${index}`} className="rounded-2xl border border-slate-200 bg-white p-4 shadow-sm">
<div className="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">
<div className="min-w-0 space-y-2">
<div className="flex flex-wrap items-center gap-2">
<Skeleton className="h-5 w-40" />
<Skeleton className="h-5 w-16 rounded-full" />
<Skeleton className="h-5 w-14 rounded-full" />
</div>
<Skeleton className="h-4 w-64" />
</div>
<div className="flex items-center gap-2">
<Skeleton className="h-8 w-16 rounded-md" />
<Skeleton className="h-8 w-20 rounded-md" />
<Skeleton className="h-8 w-8 rounded-md" />
</div>
</div>
</div>
))}
</div>
) : orderedTemplates.length === 0 ? (
<div className="rounded-xl border border-dashed border-slate-200 p-6 text-sm text-neutral-600">
Nenhum template cadastrado.