From 993bd3890af6d93180fa17eebfac6fe86ce2559d Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Thu, 18 Dec 2025 11:31:17 -0300 Subject: [PATCH] style(devices): substitui spinner por skeleton cards no loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Cria DeviceCardSkeleton que simula a estrutura do DeviceCard - Exibe grid de 6 skeletons durante carregamento - Mantém mesmo layout responsivo dos cards reais 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../admin/devices/admin-devices-overview.tsx | 48 +++++++++++++++---- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/src/components/admin/devices/admin-devices-overview.tsx b/src/components/admin/devices/admin-devices-overview.tsx index ecbf130..2502a11 100644 --- a/src/components/admin/devices/admin-devices-overview.tsx +++ b/src/components/admin/devices/admin-devices-overview.tsx @@ -50,6 +50,7 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Textarea } from "@/components/ui/textarea" import { Spinner } from "@/components/ui/spinner" +import { Skeleton } from "@/components/ui/skeleton" import { Progress } from "@/components/ui/progress" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover" @@ -2719,18 +2720,45 @@ function EmptyState() { ) } +function DeviceCardSkeleton() { + return ( +
+
+ +
+ + +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ ) +} + function LoadingState() { return ( -
-
- -
-
-

Carregando dispositivos...

-

- Sincronizando o inventário em tempo real. Isso leva apenas alguns instantes. -

-
+
+ {Array.from({ length: 6 }).map((_, i) => ( + + ))}
) }