@@ -6,7 +6,7 @@ import type { EventTypeAppCardComponentProps } from "@calcom/app-store/types";
66import type { EventTypeAppsList } from "@calcom/app-store/utils" ;
77import useAppsData from "@calcom/features/apps/hooks/useAppsData" ;
88import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager" ;
9- import type { FormValues , EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types" ;
9+ import type { FormValues , EventTypeSetupProps , EventTypeApps } from "@calcom/features/eventtypes/lib/types" ;
1010import ServerTrans from "@calcom/lib/components/ServerTrans" ;
1111import { useLocale } from "@calcom/lib/hooks/useLocale" ;
1212import { trpc } from "@calcom/trpc/react" ;
@@ -18,12 +18,16 @@ import { Section } from "@calcom/ui/components/section";
1818export type EventType = Pick < EventTypeSetupProps , "eventType" > [ "eventType" ] &
1919 EventTypeAppCardComponentProps [ "eventType" ] ;
2020
21- export const EventAppsTab = ( { eventType } : { eventType : EventType } ) => {
21+ export const EventAppsTab = ( {
22+ eventType,
23+ eventTypeApps,
24+ isPendingApps,
25+ } : {
26+ eventType : EventType ;
27+ eventTypeApps ?: EventTypeApps ;
28+ isPendingApps : boolean ;
29+ } ) => {
2230 const { t } = useLocale ( ) ;
23- const { data : eventTypeApps , isPending } = trpc . viewer . apps . integrations . useQuery ( {
24- extendsFeature : "EventType" ,
25- teamId : eventType . team ?. id || eventType . parent ?. teamId ,
26- } ) ;
2731
2832 const utils = trpc . useUtils ( ) ;
2933
@@ -126,7 +130,7 @@ export const EventAppsTab = ({ eventType }: { eventType: EventType }) => {
126130 }
127131 />
128132 ) }
129- { ! isPending && ! installedApps ?. length ? (
133+ { ! isPendingApps && ! installedApps ?. length ? (
130134 < EmptyScreen
131135 Icon = "grid-3x3"
132136 headline = { t ( "empty_installed_apps_headline" ) }
@@ -168,7 +172,7 @@ export const EventAppsTab = ({ eventType }: { eventType: EventType }) => {
168172 { /* TODO: Add back after salesforce v3 dev */ }
169173 { ! appsDisableProps . disabled && (
170174 < div className = "bg-muted mt-4 rounded-2xl p-4" >
171- { ! isPending && notInstalledApps ?. length ? (
175+ { ! isPendingApps && notInstalledApps ?. length ? (
172176 < div className = "mb-4 flex flex-col" >
173177 < Section . Title > { t ( "available_apps_lower_case" ) } </ Section . Title >
174178 < Section . Description >
0 commit comments