diff --git a/src/components/admin/devices/admin-devices-overview.tsx b/src/components/admin/devices/admin-devices-overview.tsx index a90c64f..d918bee 100644 --- a/src/components/admin/devices/admin-devices-overview.tsx +++ b/src/components/admin/devices/admin-devices-overview.tsx @@ -3415,7 +3415,7 @@ export function DeviceDetails({ device }: DeviceDetailsProps) { }, [device?.customFields]) const editableFields = useMemo( - () => (deviceFieldDefs ?? []).map((f) => ({ id: f.id, key: f.key, label: f.label, type: (f as any).type ?? "text", options: (f as any).options ?? [] })), + () => (deviceFieldDefs ?? []).map((f) => ({ id: f.id, key: f.key, label: f.label, type: f.type ?? "text", options: f.options ?? [] })), [deviceFieldDefs] ) diff --git a/src/components/portal/portal-ticket-list.tsx b/src/components/portal/portal-ticket-list.tsx index 6bed983..fac7bfe 100644 --- a/src/components/portal/portal-ticket-list.tsx +++ b/src/components/portal/portal-ticket-list.tsx @@ -36,6 +36,13 @@ export function PortalTicketList() { return mapTicketsFromServerList((ticketsRaw as unknown[]) ?? []) }, [ticketsRaw]) + const lastResolvedNoCsat = useMemo(() => { + const resolved = (tickets as Ticket[]) + .filter((t) => t.status === "RESOLVED" && (t.csatScore == null)) + .sort((a, b) => (b.resolvedAt?.getTime?.() ?? 0) - (a.resolvedAt?.getTime?.() ?? 0)) + return resolved[0] ?? null + }, [tickets]) + const isLoading = Boolean(viewerId && ticketsRaw === undefined) if (isLoading) { @@ -84,13 +91,6 @@ export function PortalTicketList() { ) } - const lastResolvedNoCsat = useMemo(() => { - const resolved = (tickets as Ticket[]) - .filter((t) => t.status === "RESOLVED" && (t.csatScore == null)) - .sort((a, b) => (b.resolvedAt?.getTime?.() ?? 0) - (a.resolvedAt?.getTime?.() ?? 0)) - return resolved[0] ?? null - }, [tickets]) - return (