diff --git a/src/app/emprestimos/emprestimos-page-client.tsx b/src/app/emprestimos/emprestimos-page-client.tsx index d6d7746..ba7b699 100644 --- a/src/app/emprestimos/emprestimos-page-client.tsx +++ b/src/app/emprestimos/emprestimos-page-client.tsx @@ -48,6 +48,7 @@ import { TableRow, } from "@/components/ui/table" import { Spinner } from "@/components/ui/spinner" +import { Skeleton } from "@/components/ui/skeleton" import { SearchableCombobox, type SearchableComboboxOption } from "@/components/ui/searchable-combobox" import { DateRangeButton, type DateRangeValue } from "@/components/date-range-button" import { DatePicker } from "@/components/ui/date-picker" @@ -503,20 +504,15 @@ export function EmprestimosPageClient() { {/* Table Section */}
- {!emprestimos ? ( -
- - Carregando empréstimos... -
- ) : filteredEmprestimos.length === 0 ? ( + {emprestimos && filteredEmprestimos.length === 0 ? ( - Nenhum empréstimo encontrado + Nenhum emprestimo encontrado - Ajuste os filtros ou crie um novo empréstimo para começar. + Ajuste os filtros ou crie um novo emprestimo para comecar. @@ -527,17 +523,32 @@ export function EmprestimosPageClient() { Ref Cliente - Responsável + Responsavel Equipamentos - Empréstimo + Emprestimo Prevista Status Valor - Ações + Acoes - {filteredEmprestimos.map((emp) => ( + {!emprestimos ? ( + // Skeleton rows durante o loading + Array.from({ length: 5 }).map((_, idx) => ( + + + + + + + + + + + + )) + ) : filteredEmprestimos.map((emp) => (