From 811ad0641a44c000c5f581d48d2c44912b6e81e2 Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Wed, 17 Dec 2025 09:52:56 -0300 Subject: [PATCH] feat(portal): adiciona skeletons para melhor UX durante carregamento MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Adiciona skeleton no header quando dados do usuario estao carregando - Remove mensagem "Sem e-mail definido" durante loading - Substitui spinner por skeleton cards na lista de tickets - Cria componente PortalTicketCardSkeleton para estado de loading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/components/portal/portal-shell.tsx | 40 +++++++----- src/components/portal/portal-ticket-list.tsx | 69 ++++++++++++++++---- 2 files changed, 81 insertions(+), 28 deletions(-) diff --git a/src/components/portal/portal-shell.tsx b/src/components/portal/portal-shell.tsx index abdaa73..17abd38 100644 --- a/src/components/portal/portal-shell.tsx +++ b/src/components/portal/portal-shell.tsx @@ -9,6 +9,7 @@ import { toast } from "sonner" import { Button } from "@/components/ui/button" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Skeleton } from "@/components/ui/skeleton" import { cn } from "@/lib/utils" import { useAuth, signOut } from "@/lib/auth-client" @@ -115,19 +116,29 @@ export function PortalShell({ children }: PortalShellProps) { })}
-
- - - {initials} - -
- {displayName} - {displayEmail || "Sem e-mail definido"} - {personaValue ? ( - {personaLabel} - ) : null} + {machineContextLoading ? ( +
+ +
+ + +
-
+ ) : ( +
+ + + {initials} + +
+ {displayName} + {displayEmail || "Sem e-mail definido"} + {personaValue ? ( + {personaLabel} + ) : null} +
+
+ )} {!isMachineSession ? (
) : null} - {!machineContextError && machineContextLoading ? ( -
- Recuperando dados do colaborador vinculado... -
- ) : null} {children}