ux: evitar estados intermediarios incorretos no portal e desktop
This commit is contained in:
parent
61d3573830
commit
3ee072854f
2 changed files with 6 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ import {
|
|||
} from "@/components/portal/portal-ticket-filters"
|
||||
|
||||
export function PortalTicketList() {
|
||||
const { convexUserId, session, machineContext, role } = useAuth()
|
||||
const { convexUserId, session, machineContext, role, isLoading: authLoading, machineContextLoading } = useAuth()
|
||||
|
||||
const viewerId = (convexUserId ?? machineContext?.assignedUserId ?? null) as Id<"users"> | null
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ export function PortalTicketList() {
|
|||
setFilters(defaultPortalTicketFilters)
|
||||
}
|
||||
|
||||
const isLoading = Boolean(viewerId && ticketsRaw === undefined)
|
||||
const isLoading = Boolean(authLoading || machineContextLoading || (viewerId && ticketsRaw === undefined))
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue