perf: redundant query in eventsAppsTab (#24491)

This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-10-16 03:12:31 +00:00
1 parent 573132198e
commit 02fdc1361c
2 files changed
+20 -10

No files matched your search

@@ -169,7 +169,7 @@ const EventTypeWeb = ({
const [pendingRoute, setPendingRoute] = useState("");
const { eventType, locationOptions, team, teamMembers, destinationCalendar } = rest;
const [slugExistsChildrenDialogOpen, setSlugExistsChildrenDialogOpen] = useState<ChildrenEventType[]>([]);
const { data: eventTypeApps } = trpc.viewer.apps.integrations.useQuery({
const { data: eventTypeApps, isPending: isPendingApps } = trpc.viewer.apps.integrations.useQuery({
extendsFeature: "EventType",
teamId: eventType.team?.id || eventType.parent?.teamId,
onlyInstalled: true,
@@ -287,7 +287,13 @@ const EventTypeWeb = ({
),
instant: <EventInstantTab eventType={eventType} isTeamEvent={!!team} />,
recurring: <EventRecurringTab eventType={eventType} />,
apps: <EventAppsTab eventType={{ ...eventType, URL: permalink }} />,
apps: (
<EventAppsTab
eventType={{ ...eventType, URL: permalink }}
eventTypeApps={eventTypeApps}
isPendingApps={isPendingApps}
/>
),
workflows:
allActiveWorkflows && canReadWorkflows ? (
<EventWorkflowsTab eventType={eventType} workflows={allActiveWorkflows} />