style: refresh ticket ui components

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
esdrasrenan 2025-10-04 20:13:06 -03:00
parent 5c16ab75a6
commit 744d5933d4
16 changed files with 718 additions and 650 deletions

View file

@ -6,19 +6,17 @@ import { api } from "@/convex/_generated/api";
import { DEFAULT_TENANT_ID } from "@/lib/constants";
import { mapTicketsFromServerList } from "@/lib/mappers/ticket";
import { TicketsTable } from "@/components/tickets/tickets-table";
import { Spinner } from "@/components/ui/spinner";
import type { Ticket } from "@/lib/schemas/ticket";
export function RecentTicketsPanel() {
const ticketsRaw = useQuery(api.tickets.list, { tenantId: DEFAULT_TENANT_ID, limit: 10 });
if (ticketsRaw === undefined) {
return (
<div className="rounded-xl border bg-card p-4">
<div className="rounded-2xl border border-slate-200 bg-white p-4 shadow-sm">
<div className="grid gap-3">
{Array.from({ length: 4 }).map((_, i) => (
<div key={i} className="flex items-center justify-between gap-3">
<div className="h-4 w-56 animate-pulse rounded bg-muted" />
<div className="h-4 w-20 animate-pulse rounded bg-muted" />
<div className="h-4 w-56 animate-pulse rounded bg-slate-100" />
<div className="h-4 w-20 animate-pulse rounded bg-slate-100" />
</div>
))}
</div>
@ -27,7 +25,7 @@ export function RecentTicketsPanel() {
}
const tickets = mapTicketsFromServerList((ticketsRaw ?? []) as unknown[]);
return (
<div className="rounded-xl border bg-card">
<div className="rounded-2xl border border-slate-200 bg-white shadow-sm">
<TicketsTable tickets={tickets} />
</div>
);