Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ export function getOrganizationCountQuery(request: GetOrganizationCountRequest)

export function getOrganizationEventsQuery(request: GetOrganizationEventsRequest) {
return createQuery<FetchClientResponse<EventSummaryModel<SummaryTemplateKeys>[]>, ProblemDetails>(() => {
const requestEnabled = request.enabled?.() ?? true;
const organizationId = request.route.organizationId;
const params = request.params
? {
Expand All @@ -464,7 +465,7 @@ export function getOrganizationEventsQuery(request: GetOrganizationEventsRequest
: undefined;

return {
enabled: () => !!accessToken.current && !!organizationId && (request.enabled?.() ?? true),
enabled: () => !!accessToken.current && !!organizationId && requestEnabled,
placeholderData: keepPreviousData,
queryFn: async () => {
const client = useFetchClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
}
});
const errorEventAvailability = $derived.by((): ProductTourContext['errorEventAvailability'] => {
if (!organizationId || !catalogOpen || errorEventsQuery.isPending) {
if (!organizationId || !catalogOpen || errorEventsQuery.isPending || errorEventsQuery.isPlaceholderData) {
return 'loading';
}

Expand Down
Loading