fix: avoid Convex skip sentinel in queries
This commit is contained in:
parent
3880ff57bd
commit
3de7eccaa8
32 changed files with 131 additions and 125 deletions
|
|
@ -17,7 +17,7 @@ export function TicketQueueSummaryCards({ queues }: TicketQueueSummaryProps) {
|
|||
const { convexUserId, isStaff } = useAuth()
|
||||
const enabled = Boolean(isStaff && convexUserId)
|
||||
const queueArgs = enabled ? { tenantId: DEFAULT_TENANT_ID, viewerId: convexUserId as Id<"users"> } : undefined
|
||||
const fromServer = useQuery(enabled ? api.queues.summary : "skip", queueArgs)
|
||||
const fromServer = useQuery(enabled ? api.queues.summary : undefined, queueArgs)
|
||||
const serverData = Array.isArray(fromServer) ? fromServer : undefined
|
||||
const data: TicketQueueSummary[] = queues ?? serverData ?? []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue