diff --git a/apps/web/components/apps/AppList.tsx b/apps/web/components/apps/AppList.tsx index 8c4dc766cf..0c3df3ba3c 100644 --- a/apps/web/components/apps/AppList.tsx +++ b/apps/web/components/apps/AppList.tsx @@ -33,7 +33,7 @@ interface AppListProps { export const AppList = ({ data, handleDisconnect, variant, listClassName }: AppListProps) => { const { data: defaultConferencingApp } = trpc.viewer.getUsersDefaultConferencingApp.useQuery(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [bulkUpdateModal, setBulkUpdateModal] = useState(false); const [locationType, setLocationType] = useState<(EventLocationType & { slug: string }) | undefined>( undefined @@ -201,7 +201,7 @@ function ConnectOrDisconnectIntegrationMenuItem(props: { const { type, credentialId, isGlobal, installed, handleDisconnect, teamId } = props; const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const handleOpenChange = () => { utils.viewer.integrations.invalidate(); }; diff --git a/apps/web/components/apps/CalendarListContainer.tsx b/apps/web/components/apps/CalendarListContainer.tsx index 12f8fbe610..a98cd0c974 100644 --- a/apps/web/components/apps/CalendarListContainer.tsx +++ b/apps/web/components/apps/CalendarListContainer.tsx @@ -192,7 +192,7 @@ export function CalendarListContainer(props: { heading?: boolean; fromOnboarding } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const onChanged = () => Promise.allSettled([ utils.viewer.integrations.invalidate( diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index 180b30eb28..248d4e2be1 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -64,7 +64,7 @@ function BookingListItem(booking: BookingItemProps) { t, i18n: { language }, } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [rejectionReason, setRejectionReason] = useState(""); const [rejectionDialogIsOpen, setRejectionDialogIsOpen] = useState(false); const [chargeCardDialogIsOpen, setChargeCardDialogIsOpen] = useState(false); diff --git a/apps/web/components/dialog/ChargeCardDialog.tsx b/apps/web/components/dialog/ChargeCardDialog.tsx index 0cec34ae13..982b3d225b 100644 --- a/apps/web/components/dialog/ChargeCardDialog.tsx +++ b/apps/web/components/dialog/ChargeCardDialog.tsx @@ -24,7 +24,7 @@ interface IRescheduleDialog { export const ChargeCardDialog = (props: IRescheduleDialog) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { isOpenDialog, setIsOpenDialog, bookingId } = props; const [chargeError, setChargeError] = useState(false); const chargeCardMutation = trpc.viewer.payments.chargeCard.useMutation({ diff --git a/apps/web/components/dialog/RescheduleDialog.tsx b/apps/web/components/dialog/RescheduleDialog.tsx index 2ed251e632..42ea9d7806 100644 --- a/apps/web/components/dialog/RescheduleDialog.tsx +++ b/apps/web/components/dialog/RescheduleDialog.tsx @@ -23,7 +23,7 @@ interface IRescheduleDialog { export const RescheduleDialog = (props: IRescheduleDialog) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { isOpenDialog, setIsOpenDialog, bookingUId: bookingId } = props; const [rescheduleReason, setRescheduleReason] = useState(""); diff --git a/apps/web/components/eventtype/EventTypeSingleLayout.tsx b/apps/web/components/eventtype/EventTypeSingleLayout.tsx index a8bc19bf79..5c39f24fdb 100644 --- a/apps/web/components/eventtype/EventTypeSingleLayout.tsx +++ b/apps/web/components/eventtype/EventTypeSingleLayout.tsx @@ -123,7 +123,7 @@ function DeleteDialog({ open, onOpenChange, }: { isManagedEvent: string; eventTypeId: number } & Pick) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const router = useRouter(); const deleteMutation = trpc.viewer.eventTypes.delete.useMutation({ diff --git a/apps/web/components/eventtype/EventWebhooksTab.tsx b/apps/web/components/eventtype/EventWebhooksTab.tsx index 9ef1c74e73..2d6dec9246 100644 --- a/apps/web/components/eventtype/EventWebhooksTab.tsx +++ b/apps/web/components/eventtype/EventWebhooksTab.tsx @@ -19,7 +19,7 @@ import { Alert, Button, Dialog, DialogContent, EmptyScreen, showToast } from "@c export const EventWebhooksTab = ({ eventType }: Pick) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const formMethods = useFormContext(); const { data: webhooks } = trpc.viewer.webhook.list.useQuery({ eventTypeId: eventType.id }); diff --git a/apps/web/components/eventtype/InstantEventController.tsx b/apps/web/components/eventtype/InstantEventController.tsx index e0d5c0fe29..a3b2d49008 100644 --- a/apps/web/components/eventtype/InstantEventController.tsx +++ b/apps/web/components/eventtype/InstantEventController.tsx @@ -99,7 +99,7 @@ export default function InstantEventController({ const InstantMeetingWebhooks = ({ eventType }: { eventType: EventTypeSetup }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const formMethods = useFormContext(); const { data: webhooks } = trpc.viewer.webhook.list.useQuery({ diff --git a/apps/web/components/getting-started/steps-views/UserProfile.tsx b/apps/web/components/getting-started/steps-views/UserProfile.tsx index 2b89ad559d..f0331177bf 100644 --- a/apps/web/components/getting-started/steps-views/UserProfile.tsx +++ b/apps/web/components/getting-started/steps-views/UserProfile.tsx @@ -25,7 +25,7 @@ const UserProfile = () => { const { data: eventTypes } = trpc.viewer.eventTypes.list.useQuery(); const [imageSrc, setImageSrc] = useState(user?.avatar || ""); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const router = useRouter(); const createEventType = trpc.viewer.eventTypes.create.useMutation(); const telemetry = useTelemetry(); diff --git a/apps/web/components/getting-started/steps-views/UserSettings.tsx b/apps/web/components/getting-started/steps-views/UserSettings.tsx index c872eed0a0..d2f22d531e 100644 --- a/apps/web/components/getting-started/steps-views/UserSettings.tsx +++ b/apps/web/components/getting-started/steps-views/UserSettings.tsx @@ -48,7 +48,7 @@ const UserSettings = (props: IUserSettingsProps) => { telemetry.event(telemetryEventTypes.onboardingStarted); }, [telemetry]); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const onSuccess = async () => { await utils.viewer.me.invalidate(); nextStep(); diff --git a/apps/web/components/security/DisableUserImpersonation.tsx b/apps/web/components/security/DisableUserImpersonation.tsx index 6300be1aac..e33e157136 100644 --- a/apps/web/components/security/DisableUserImpersonation.tsx +++ b/apps/web/components/security/DisableUserImpersonation.tsx @@ -3,7 +3,7 @@ import { trpc } from "@calcom/trpc/react"; import { Badge, Button, showToast } from "@calcom/ui"; const DisableUserImpersonation = ({ disableImpersonation }: { disableImpersonation: boolean }) => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); diff --git a/apps/web/modules/event-types/views/event-types-listing-view.tsx b/apps/web/modules/event-types/views/event-types-listing-view.tsx index 2b1328c923..4ff188f428 100644 --- a/apps/web/modules/event-types/views/event-types-listing-view.tsx +++ b/apps/web/modules/event-types/views/event-types-listing-view.tsx @@ -230,7 +230,7 @@ export const EventTypeList = ({ const [deleteDialogTypeSchedulingType, setDeleteDialogSchedulingType] = useState( null ); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.eventTypeOrder.useMutation({ onError: async (err) => { console.error(err.message); @@ -896,7 +896,7 @@ const Main = ({ className="mt-4 flex flex-col" data-testid={`slug-${group.profile.slug}`} key={group.profile.slug}> - {/* If the group is readonly and empty don't leave a floating header when the user cant see the create box due + {/* If the group is readonly and empty don't leave a floating header when the user cant see the create box due to it being readonly for that user */} {group.eventTypes.length === 0 && group.metadata.readOnly ? null : ( { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const telemetry = useTelemetry(); const { data: { tabName }, diff --git a/apps/web/pages/availability/index.tsx b/apps/web/pages/availability/index.tsx index 2e8938151c..569b47fbcf 100644 --- a/apps/web/pages/availability/index.tsx +++ b/apps/web/pages/availability/index.tsx @@ -24,7 +24,7 @@ import SkeletonLoader from "@components/availability/SkeletonLoader"; export function AvailabilityList({ schedules }: RouterOutputs["viewer"]["availability"]["list"]) { const { t } = useLocale(); const [bulkUpdateModal, setBulkUpdateModal] = useState(false); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const meQuery = trpc.viewer.me.useQuery(); diff --git a/apps/web/pages/settings/my-account/appearance.tsx b/apps/web/pages/settings/my-account/appearance.tsx index 07dbddd1d5..53bde759cf 100644 --- a/apps/web/pages/settings/my-account/appearance.tsx +++ b/apps/web/pages/settings/my-account/appearance.tsx @@ -93,7 +93,7 @@ const AppearanceView = ({ hasPaidPlan: boolean; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [darkModeError, setDarkModeError] = useState(false); const [lightModeError, setLightModeError] = useState(false); const [isCustomBrandColorChecked, setIsCustomBranColorChecked] = useState( diff --git a/apps/web/pages/settings/my-account/general.tsx b/apps/web/pages/settings/my-account/general.tsx index ba5589794a..4802e612d3 100644 --- a/apps/web/pages/settings/my-account/general.tsx +++ b/apps/web/pages/settings/my-account/general.tsx @@ -60,7 +60,7 @@ const GeneralQueryView = () => { }; const GeneralView = ({ localeProp, user }: GeneralViewProps) => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const { update } = useSession(); const [isUpdateBtnLoading, setIsUpdateBtnLoading] = useState(false); diff --git a/apps/web/pages/settings/my-account/profile.tsx b/apps/web/pages/settings/my-account/profile.tsx index 63c6567cc7..d662b32bec 100644 --- a/apps/web/pages/settings/my-account/profile.tsx +++ b/apps/web/pages/settings/my-account/profile.tsx @@ -94,7 +94,7 @@ export type FormValues = { const ProfileView = () => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { update } = useSession(); const { data: user, isPending } = trpc.viewer.me.useQuery({ includePasswordAdded: true }); diff --git a/apps/web/pages/settings/security/impersonation.tsx b/apps/web/pages/settings/security/impersonation.tsx index 6a4143d7ab..b38d09bf4a 100644 --- a/apps/web/pages/settings/security/impersonation.tsx +++ b/apps/web/pages/settings/security/impersonation.tsx @@ -23,7 +23,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st const ProfileImpersonationView = ({ user }: { user: RouterOutputs["viewer"]["me"] }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [disableImpersonation, setDisableImpersonation] = useState( user?.disableImpersonation ); diff --git a/apps/web/pages/settings/security/password.tsx b/apps/web/pages/settings/security/password.tsx index 591113d3bb..48f99f3f48 100644 --- a/apps/web/pages/settings/security/password.tsx +++ b/apps/web/pages/settings/security/password.tsx @@ -61,7 +61,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st const PasswordView = ({ user }: PasswordViewProps) => { const { data } = useSession(); const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const metadata = userMetadataSchema.safeParse(user?.metadata); const initialSessionTimeout = metadata.success ? metadata.data?.sessionTimeout : undefined; diff --git a/apps/web/pages/settings/security/two-factor-auth.tsx b/apps/web/pages/settings/security/two-factor-auth.tsx index 567d585288..30c4adb0cf 100644 --- a/apps/web/pages/settings/security/two-factor-auth.tsx +++ b/apps/web/pages/settings/security/two-factor-auth.tsx @@ -34,7 +34,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st }; const TwoFactorAuthView = () => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const { data: user, isPending } = trpc.viewer.me.useQuery({ includePasswordAdded: true }); diff --git a/packages/app-store/_components/OmniInstallAppButton.tsx b/packages/app-store/_components/OmniInstallAppButton.tsx index daeb6ebb62..c3848f3cdf 100644 --- a/packages/app-store/_components/OmniInstallAppButton.tsx +++ b/packages/app-store/_components/OmniInstallAppButton.tsx @@ -24,7 +24,7 @@ export default function OmniInstallAppButton({ }) { const { t } = useLocale(); const { data: app } = useApp(appId); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = useAddAppMutation(null, { returnTo, diff --git a/packages/app-store/alby/components/AlbyPaymentComponent.tsx b/packages/app-store/alby/components/AlbyPaymentComponent.tsx index a9800fe6da..a0117042a7 100644 --- a/packages/app-store/alby/components/AlbyPaymentComponent.tsx +++ b/packages/app-store/alby/components/AlbyPaymentComponent.tsx @@ -130,7 +130,7 @@ function PaymentChecker(props: PaymentCheckerProps) { // TODO: subscribe rather than polling const searchParams = useCompatSearchParams(); const bookingSuccessRedirect = useBookingSuccessRedirect(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); useEffect(() => { diff --git a/packages/app-store/make/pages/setup/index.tsx b/packages/app-store/make/pages/setup/index.tsx index 7c5de88a4e..1a8985fe48 100644 --- a/packages/app-store/make/pages/setup/index.tsx +++ b/packages/app-store/make/pages/setup/index.tsx @@ -16,7 +16,7 @@ export default function MakeSetup({ inviteLink }: InferGetServerSidePropsType>({}); const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const integrations = trpc.viewer.integrations.useQuery({ variant: "automation" }); const oldApiKey = trpc.viewer.apiKeys.findKeyOfType.useQuery({ appId: MAKE }); const teamsList = trpc.viewer.teams.listOwnedTeams.useQuery(undefined, { diff --git a/packages/app-store/routing-forms/components/FormActions.tsx b/packages/app-store/routing-forms/components/FormActions.tsx index fbe6f8ed46..848777edf6 100644 --- a/packages/app-store/routing-forms/components/FormActions.tsx +++ b/packages/app-store/routing-forms/components/FormActions.tsx @@ -63,7 +63,7 @@ function NewFormDialog({ appUrl }: { appUrl: string }) { const routerQuery = useRouterQuery(); const { t } = useLocale(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.appRoutingForms.formMutation.useMutation({ onSuccess: (_data, variables) => { @@ -193,7 +193,7 @@ function Dialogs({ setDeleteDialogOpen: (open: boolean) => void; deleteDialogFormId: string | null; }) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const router = useRouter(); const { t } = useLocale(); const deleteMutation = trpc.viewer.appRoutingForms.deleteForm.useMutation({ @@ -276,7 +276,7 @@ export function FormActionsProvider({ appUrl, children }: { appUrl: string; chil const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); const [deleteDialogFormId, setDeleteDialogFormId] = useState(null); const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const toggleMutation = trpc.viewer.appRoutingForms.formMutation.useMutation({ onMutate: async ({ id: formId, disabled }) => { diff --git a/packages/app-store/routing-forms/components/SingleForm.tsx b/packages/app-store/routing-forms/components/SingleForm.tsx index 22cb9f61b8..b9782e5200 100644 --- a/packages/app-store/routing-forms/components/SingleForm.tsx +++ b/packages/app-store/routing-forms/components/SingleForm.tsx @@ -234,7 +234,7 @@ type SingleFormComponentProps = { }; function SingleForm({ form, appUrl, Page, enrichedWithUserProfileForm }: SingleFormComponentProps) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const [isTestPreviewOpen, setIsTestPreviewOpen] = useState(false); diff --git a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx index 48a37cc6ed..c2686af6a7 100644 --- a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx +++ b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx @@ -66,7 +66,7 @@ export default function RoutingForms({ const { hasPaidPlan } = useHasPaidPlan(); const routerQuery = useRouterQuery(); const hookForm = useFormContext(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [parent] = useAutoAnimate(); const mutation = trpc.viewer.routingFormOrder.useMutation({ diff --git a/packages/app-store/wipemycalother/components/confirmDialog.tsx b/packages/app-store/wipemycalother/components/confirmDialog.tsx index 5e02ed9720..2dc38cb8bc 100644 --- a/packages/app-store/wipemycalother/components/confirmDialog.tsx +++ b/packages/app-store/wipemycalother/components/confirmDialog.tsx @@ -49,7 +49,7 @@ export const ConfirmDialog = (props: IConfirmDialogWipe) => { const endDate = today.endOf("day"); const dateFormat = "ddd, MMM D, YYYY h:mm A"; - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const rescheduleApi = useMutation({ mutationFn: async () => { diff --git a/packages/app-store/zapier/pages/setup/index.tsx b/packages/app-store/zapier/pages/setup/index.tsx index 0294f02cdd..805a961f8c 100644 --- a/packages/app-store/zapier/pages/setup/index.tsx +++ b/packages/app-store/zapier/pages/setup/index.tsx @@ -16,7 +16,7 @@ const ZAPIER = "zapier"; export default function ZapierSetup(props: IZapierSetupProps) { const [newApiKeys, setNewApiKeys] = useState>({}); const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const integrations = trpc.viewer.integrations.useQuery({ variant: "automation" }); const oldApiKey = trpc.viewer.apiKeys.findKeyOfType.useQuery({ appId: ZAPIER }); const teamsList = trpc.viewer.teams.listOwnedTeams.useQuery(undefined, { diff --git a/packages/features/apps/AdminAppsList.tsx b/packages/features/apps/AdminAppsList.tsx index 115930e1a9..1d4ad2b0e6 100644 --- a/packages/features/apps/AdminAppsList.tsx +++ b/packages/features/apps/AdminAppsList.tsx @@ -47,7 +47,7 @@ const IntegrationContainer = ({ handleModelOpen: (data: EditModalState) => void; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [disableDialog, setDisableDialog] = useState(false); const showKeyModal = (fromEnabled?: boolean) => { @@ -187,7 +187,7 @@ const EditKeysModal: FC<{ fromEnabled?: boolean; appName?: string; }> = (props) => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const { dirName, slug, type, isOpen, keys, handleModelClose, fromEnabled, appName } = props; const appKeySchema = appKeysSchemas[dirName as keyof typeof appKeysSchemas]; diff --git a/packages/features/apps/components/DisconnectIntegration.tsx b/packages/features/apps/components/DisconnectIntegration.tsx index b5f1fd3adf..8a81b7bfd1 100644 --- a/packages/features/apps/components/DisconnectIntegration.tsx +++ b/packages/features/apps/components/DisconnectIntegration.tsx @@ -22,7 +22,7 @@ export default function DisconnectIntegration({ }) { const { t } = useLocale(); const [modalOpen, setModalOpen] = useState(false); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.deleteCredential.useMutation({ onSuccess: () => { diff --git a/packages/features/apps/components/DisconnectIntegrationModal.tsx b/packages/features/apps/components/DisconnectIntegrationModal.tsx index 24c9da5e0a..0899e07d98 100644 --- a/packages/features/apps/components/DisconnectIntegrationModal.tsx +++ b/packages/features/apps/components/DisconnectIntegrationModal.tsx @@ -16,7 +16,7 @@ export default function DisconnectIntegrationModal({ teamId, }: DisconnectIntegrationModalProps) { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.deleteCredential.useMutation({ onSuccess: () => { diff --git a/packages/features/bookings/Booker/components/hooks/useCalendars.ts b/packages/features/bookings/Booker/components/hooks/useCalendars.ts index b6f90c2c1a..371a84bea9 100644 --- a/packages/features/bookings/Booker/components/hooks/useCalendars.ts +++ b/packages/features/bookings/Booker/components/hooks/useCalendars.ts @@ -25,7 +25,7 @@ export const useCalendars = ({ hasSession }: UseCalendarsProps) => { credentialId: number; externalId: string; }>("toggledConnectedCalendars", []); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [calendarSettingsOverlay] = useOverlayCalendarStore( (state) => [state.calendarSettingsOverlayModal, state.setCalendarSettingsOverlayModal], diff --git a/packages/features/calendars/CalendarSwitch.tsx b/packages/features/calendars/CalendarSwitch.tsx index d8c2b33075..6bafec9603 100644 --- a/packages/features/calendars/CalendarSwitch.tsx +++ b/packages/features/calendars/CalendarSwitch.tsx @@ -19,7 +19,7 @@ interface ICalendarSwitchProps { const CalendarSwitch = (props: ICalendarSwitchProps) => { const { title, externalId, type, isChecked, name, isLastItemInList = false, credentialId } = props; const [checkedInternal, setCheckedInternal] = useState(isChecked); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const mutation = useMutation({ mutationFn: async ({ isOn }: { isOn: boolean }) => { diff --git a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx b/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx index c2ab1b305f..7f6727ce3e 100644 --- a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx +++ b/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx @@ -6,17 +6,7 @@ import type { TApiKeys } from "@calcom/ee/api-keys/components/ApiKeyListItem"; import LicenseRequired from "@calcom/ee/common/components/LicenseRequired"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; -import { - Button, - DialogFooter, - Form, - Icon, - SelectField, - showToast, - Switch, - TextField, - Tooltip, -} from "@calcom/ui"; +import { Button, DialogFooter, Form, SelectField, showToast, Switch, TextField, Tooltip } from "@calcom/ui"; export default function ApiKeyDialogForm({ defaultValues, @@ -26,7 +16,7 @@ export default function ApiKeyDialogForm({ handleClose: () => void; }) { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const updateApiKeyMutation = trpc.viewer.apiKeys.edit.useMutation({ onSuccess() { diff --git a/packages/features/ee/api-keys/components/ApiKeyListItem.tsx b/packages/features/ee/api-keys/components/ApiKeyListItem.tsx index 8dc8f01058..ffa57fd08f 100644 --- a/packages/features/ee/api-keys/components/ApiKeyListItem.tsx +++ b/packages/features/ee/api-keys/components/ApiKeyListItem.tsx @@ -26,7 +26,7 @@ const ApiKeyListItem = ({ onEditClick: () => void; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const isExpired = apiKey?.expiresAt ? apiKey.expiresAt < new Date() : null; const neverExpires = apiKey?.expiresAt === null; diff --git a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx b/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx index fb96fe19d7..b6e4bfffea 100644 --- a/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx +++ b/packages/features/ee/dsync/components/ConfigureDirectorySync.tsx @@ -21,7 +21,7 @@ import GroupTeamMappingTable from "./GroupTeamMappingTable"; const ConfigureDirectorySync = ({ organizationId }: { organizationId: number | null }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [deleteDirectoryOpen, setDeleteDirectoryOpen] = useState(false); const { data, isLoading, isError, error } = trpc.viewer.dsync.get.useQuery({ organizationId }); diff --git a/packages/features/ee/dsync/components/CreateDirectory.tsx b/packages/features/ee/dsync/components/CreateDirectory.tsx index 557032ea5d..7ddce4218e 100644 --- a/packages/features/ee/dsync/components/CreateDirectory.tsx +++ b/packages/features/ee/dsync/components/CreateDirectory.tsx @@ -23,7 +23,7 @@ const defaultValues = { const CreateDirectory = ({ orgId }: { orgId: number | null }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const form = useForm({ defaultValues }); const [openModal, setOpenModal] = useState(false); diff --git a/packages/features/ee/dsync/components/CreateTeamDialog.tsx b/packages/features/ee/dsync/components/CreateTeamDialog.tsx index def1a02c9a..d90d231886 100644 --- a/packages/features/ee/dsync/components/CreateTeamDialog.tsx +++ b/packages/features/ee/dsync/components/CreateTeamDialog.tsx @@ -12,7 +12,7 @@ const CreateTeamDialog = (props: CreateTeamDialogProps) => { const { open, onOpenChange } = props; const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); return ( diff --git a/packages/features/ee/dsync/components/GroupNameCell.tsx b/packages/features/ee/dsync/components/GroupNameCell.tsx index 2619350e73..9953d15dbf 100644 --- a/packages/features/ee/dsync/components/GroupNameCell.tsx +++ b/packages/features/ee/dsync/components/GroupNameCell.tsx @@ -15,7 +15,7 @@ const GroupNameCell = ({ groupNames, teamId, directoryId }: GroupNameCellProps) const [showTextInput, setShowTextInput] = useState(false); const [newGroupName, setNewGroupName] = useState(""); const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const createMutation = trpc.viewer.dsync.teamGroupMapping.create.useMutation({ onSuccess: (data) => { diff --git a/packages/features/ee/organizations/pages/components/OtherTeamList.tsx b/packages/features/ee/organizations/pages/components/OtherTeamList.tsx index 4f72b90c24..5679554037 100644 --- a/packages/features/ee/organizations/pages/components/OtherTeamList.tsx +++ b/packages/features/ee/organizations/pages/components/OtherTeamList.tsx @@ -13,7 +13,7 @@ interface Props { } export default function OtherTeamList(props: Props) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [hideDropdown, setHideDropdown] = useState(false); diff --git a/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx b/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx index f5c8f164a3..3a22b2af31 100644 --- a/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx +++ b/packages/features/ee/organizations/pages/settings/admin/AdminOrgEditPage.tsx @@ -55,7 +55,7 @@ const OrgForm = ({ }) => { const { t } = useLocale(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.organizations.adminUpdate.useMutation({ onSuccess: async () => { await Promise.all([ diff --git a/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx b/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx index 8d332f282d..465242618a 100644 --- a/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx +++ b/packages/features/ee/organizations/pages/settings/admin/AdminOrgPage.tsx @@ -24,7 +24,7 @@ const { Body, Cell, ColumnTitle, Header, Row } = Table; function AdminOrgTable() { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [data] = trpc.viewer.organizations.adminGetAll.useSuspenseQuery(); const verifyMutation = trpc.viewer.organizations.adminVerify.useMutation({ onSuccess: async (_data, variables) => { @@ -277,7 +277,7 @@ const DeleteOrgDialog = ({ ); }; -async function invalidateQueries(utils: ReturnType, data: { orgId: number }) { +async function invalidateQueries(utils: ReturnType, data: { orgId: number }) { await utils.viewer.organizations.adminGetAll.invalidate(); await utils.viewer.organizations.adminGet.invalidate({ id: data.orgId, diff --git a/packages/features/ee/organizations/pages/settings/appearance.tsx b/packages/features/ee/organizations/pages/settings/appearance.tsx index 0191972acb..2658f2406d 100644 --- a/packages/features/ee/organizations/pages/settings/appearance.tsx +++ b/packages/features/ee/organizations/pages/settings/appearance.tsx @@ -32,7 +32,7 @@ const OrgAppearanceView = ({ isAdminOrOwner: boolean; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const themeForm = useForm<{ theme: string | null | undefined }>({ defaultValues: { diff --git a/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx b/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx index 43f2e07682..a593ba33d5 100644 --- a/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx +++ b/packages/features/ee/organizations/pages/settings/other-team-members-view.tsx @@ -13,7 +13,6 @@ import { MembershipRole } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; import { Meta, showToast, Button } from "@calcom/ui"; -import { Icon } from "@calcom/ui"; import { getLayout } from "../../../../settings/layouts/SettingsLayout"; import MakeTeamPrivateSwitch from "../../../teams/components/MakeTeamPrivateSwitch"; @@ -67,7 +66,7 @@ const MembersView = () => { const params = useParamsWithFallback(); const teamId = Number(params.id); const session = useSession(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); // const [query, setQuery] = useState(""); // const [queryToFetch, setQueryToFetch] = useState(""); const limit = 20; diff --git a/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx b/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx index e4d35ef37d..1511b95d60 100644 --- a/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx +++ b/packages/features/ee/organizations/pages/settings/other-team-profile-view.tsx @@ -28,7 +28,6 @@ import { DialogTrigger, Editor, Form, - Icon, ImageUploader, Label, LinkIconButton, @@ -59,7 +58,7 @@ const teamProfileFormSchema = z.object({ const OtherTeamProfileView = () => { const { t } = useLocale(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const session = useSession(); const [firstRender, setFirstRender] = useState(true); @@ -300,9 +299,7 @@ const OtherTeamProfileView = () => {
- - {t("preview")} - + {t("preview")} { - diff --git a/packages/features/ee/organizations/pages/settings/profile.tsx b/packages/features/ee/organizations/pages/settings/profile.tsx index bce21646ac..3e5f2b5b82 100644 --- a/packages/features/ee/organizations/pages/settings/profile.tsx +++ b/packages/features/ee/organizations/pages/settings/profile.tsx @@ -22,7 +22,6 @@ import { Button, Editor, Form, - Icon, ImageUploader, Label, LinkIconButton, @@ -163,7 +162,7 @@ const OrgProfileView = () => { }; const OrgProfileForm = ({ defaultValues }: { defaultValues: FormValues }) => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const [firstRender, setFirstRender] = useState(true); diff --git a/packages/features/ee/sso/components/ConnectionInfo.tsx b/packages/features/ee/sso/components/ConnectionInfo.tsx index cab9771833..7b250546e9 100644 --- a/packages/features/ee/sso/components/ConnectionInfo.tsx +++ b/packages/features/ee/sso/components/ConnectionInfo.tsx @@ -21,7 +21,7 @@ export default function ConnectionInfo({ connection: SSOConnection; }) { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const connectionType = connection.type.toUpperCase(); diff --git a/packages/features/ee/sso/components/OIDCConnection.tsx b/packages/features/ee/sso/components/OIDCConnection.tsx index daef6902a7..98b03b8c54 100644 --- a/packages/features/ee/sso/components/OIDCConnection.tsx +++ b/packages/features/ee/sso/components/OIDCConnection.tsx @@ -54,7 +54,7 @@ const CreateConnectionDialog = ({ setOpenModal: (open: boolean) => void; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const form = useForm(); const mutation = trpc.viewer.saml.updateOIDC.useMutation({ diff --git a/packages/features/ee/sso/components/SAMLConnection.tsx b/packages/features/ee/sso/components/SAMLConnection.tsx index a7d05f0b65..946f3a862a 100644 --- a/packages/features/ee/sso/components/SAMLConnection.tsx +++ b/packages/features/ee/sso/components/SAMLConnection.tsx @@ -52,7 +52,7 @@ const CreateConnectionDialog = ({ setOpenModal: (open: boolean) => void; }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const form = useForm(); const mutation = trpc.viewer.saml.update.useMutation({ diff --git a/packages/features/ee/teams/components/AddNewTeamMembers.tsx b/packages/features/ee/teams/components/AddNewTeamMembers.tsx index 7b7eac226e..e3508b3fee 100644 --- a/packages/features/ee/teams/components/AddNewTeamMembers.tsx +++ b/packages/features/ee/teams/components/AddNewTeamMembers.tsx @@ -16,7 +16,6 @@ import { trpc } from "@calcom/trpc/react"; import { Badge, Button, - Icon, showToast, SkeletonButton, SkeletonContainer, @@ -72,7 +71,7 @@ export const AddNewTeamMembersForm = ({ const { t, i18n } = useLocale(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const orgBranding = useOrgBranding(); const showDialog = searchParams?.get("inviteModal") === "true"; @@ -235,7 +234,7 @@ const AddNewTeamMemberSkeleton = () => { const PendingMemberItem = (props: { member: TeamMember; index: number; teamId: number; isOrg?: boolean }) => { const { member, index, teamId } = props; const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const session = useSession(); const bookerUrl = member.bookerUrl; const { data: currentOrg } = trpc.viewer.organizations.listCurrent.useQuery(undefined, { diff --git a/packages/features/ee/teams/components/DisableTeamImpersonation.tsx b/packages/features/ee/teams/components/DisableTeamImpersonation.tsx index 3549612074..0503f1710b 100644 --- a/packages/features/ee/teams/components/DisableTeamImpersonation.tsx +++ b/packages/features/ee/teams/components/DisableTeamImpersonation.tsx @@ -15,7 +15,7 @@ const DisableTeamImpersonation = ({ }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const query = trpc.viewer.teams.getMembershipbyUser.useQuery({ teamId, memberId }); diff --git a/packages/features/ee/teams/components/GoogleWorkspaceInviteButton.tsx b/packages/features/ee/teams/components/GoogleWorkspaceInviteButton.tsx index 08b3112bd5..92e6f3468f 100644 --- a/packages/features/ee/teams/components/GoogleWorkspaceInviteButton.tsx +++ b/packages/features/ee/teams/components/GoogleWorkspaceInviteButton.tsx @@ -35,7 +35,7 @@ export function GoogleWorkspaceInviteButton( props: PropsWithChildren<{ onSuccess: (data: string[]) => void }> ) { const featureFlags = useFlagMap(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const params = useParamsWithFallback(); const teamId = Number(params.id); diff --git a/packages/features/ee/teams/components/InviteLinkSettingsModal.tsx b/packages/features/ee/teams/components/InviteLinkSettingsModal.tsx index 3ca0b361d1..13aa175255 100644 --- a/packages/features/ee/teams/components/InviteLinkSettingsModal.tsx +++ b/packages/features/ee/teams/components/InviteLinkSettingsModal.tsx @@ -19,7 +19,7 @@ export interface LinkSettingsForm { export default function InviteLinkSettingsModal(props: InvitationLinkSettingsModalProps) { const { t } = useLocale(); - const trpcContext = trpc.useContext(); + const trpcContext = trpc.useUtils(); const deleteInviteMutation = trpc.viewer.teams.deleteInvite.useMutation({ onSuccess: () => { diff --git a/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx b/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx index c04d0a728d..d8633902b7 100644 --- a/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx +++ b/packages/features/ee/teams/components/MakeTeamPrivateSwitch.tsx @@ -17,7 +17,7 @@ const MakeTeamPrivateSwitch = ({ }) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.teams.update.useMutation({ onError: (err) => { diff --git a/packages/features/ee/teams/components/MemberChangeRoleModal.tsx b/packages/features/ee/teams/components/MemberChangeRoleModal.tsx index 4c04a58b0d..dbe062d510 100644 --- a/packages/features/ee/teams/components/MemberChangeRoleModal.tsx +++ b/packages/features/ee/teams/components/MemberChangeRoleModal.tsx @@ -45,7 +45,7 @@ export default function MemberChangeRoleModal(props: { } ); const [errorMessage, setErrorMessage] = useState(""); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const changeRoleMutation = trpc.viewer.teams.changeMemberRole.useMutation({ async onSuccess() { diff --git a/packages/features/ee/teams/components/MemberInvitationModal.tsx b/packages/features/ee/teams/components/MemberInvitationModal.tsx index 01cc22fc41..6c5391298b 100644 --- a/packages/features/ee/teams/components/MemberInvitationModal.tsx +++ b/packages/features/ee/teams/components/MemberInvitationModal.tsx @@ -69,7 +69,7 @@ function toggleElementInArray(value: string[] | string | undefined, element: str export default function MemberInvitationModal(props: MemberInvitationModalProps) { const { t } = useLocale(); const { disableCopyLink = false, isOrg = false } = props; - const trpcContext = trpc.useContext(); + const trpcContext = trpc.useUtils(); const session = useSession(); const { data: currentOrg } = trpc.viewer.organizations.listCurrent.useQuery(undefined, { enabled: !!session.data?.user?.org, diff --git a/packages/features/ee/teams/components/MemberListItem.tsx b/packages/features/ee/teams/components/MemberListItem.tsx index 1d56be5890..cdb1081e2f 100644 --- a/packages/features/ee/teams/components/MemberListItem.tsx +++ b/packages/features/ee/teams/components/MemberListItem.tsx @@ -50,7 +50,7 @@ const checkIsOrg = (team: Props["team"]) => { export default function MemberListItem(props: Props) { const { t, i18n } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [showChangeMemberRoleModal, setShowChangeMemberRoleModal] = useState(false); const [showTeamAvailabilityModal, setShowTeamAvailabilityModal] = useState(false); const [showImpersonateModal, setShowImpersonateModal] = useState(false); diff --git a/packages/features/ee/teams/components/TeamAvailabilityModal.tsx b/packages/features/ee/teams/components/TeamAvailabilityModal.tsx index 7aa3c0ddef..989d3833cd 100644 --- a/packages/features/ee/teams/components/TeamAvailabilityModal.tsx +++ b/packages/features/ee/teams/components/TeamAvailabilityModal.tsx @@ -17,7 +17,7 @@ interface Props { } export default function TeamAvailabilityModal(props: Props) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [selectedDate, setSelectedDate] = useState(dayjs()); const [selectedTimeZone, setSelectedTimeZone] = useState( localStorage.getItem("timeOption.preferredTimeZone") || dayjs.tz.guess() || "Europe/London" diff --git a/packages/features/ee/teams/components/TeamInviteList.tsx b/packages/features/ee/teams/components/TeamInviteList.tsx index 04976aff55..fe3bfaa87c 100644 --- a/packages/features/ee/teams/components/TeamInviteList.tsx +++ b/packages/features/ee/teams/components/TeamInviteList.tsx @@ -20,7 +20,7 @@ interface Props { } export default function TeamInviteList(props: Props) { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [hideDropdown, setHideDropdown] = useState(false); diff --git a/packages/features/ee/teams/components/TeamInviteListItem.tsx b/packages/features/ee/teams/components/TeamInviteListItem.tsx index bbc41dd212..de7c1d9f0a 100644 --- a/packages/features/ee/teams/components/TeamInviteListItem.tsx +++ b/packages/features/ee/teams/components/TeamInviteListItem.tsx @@ -33,7 +33,7 @@ interface Props { export default function TeamInviteListItem(props: Props) { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const team = props.team; const acceptOrLeaveMutation = trpc.viewer.teams.acceptOrLeave.useMutation({ diff --git a/packages/features/ee/teams/components/TeamListItem.tsx b/packages/features/ee/teams/components/TeamListItem.tsx index f697eb1454..91ceaf7c1b 100644 --- a/packages/features/ee/teams/components/TeamListItem.tsx +++ b/packages/features/ee/teams/components/TeamListItem.tsx @@ -44,7 +44,7 @@ interface Props { export default function TeamListItem(props: Props) { const searchParams = useCompatSearchParams(); const { t, i18n } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const user = trpc.viewer.me.useQuery().data; const team = props.team; diff --git a/packages/features/ee/teams/components/TeamsListing.tsx b/packages/features/ee/teams/components/TeamsListing.tsx index d9efa111fb..a46680bf8e 100644 --- a/packages/features/ee/teams/components/TeamsListing.tsx +++ b/packages/features/ee/teams/components/TeamsListing.tsx @@ -15,7 +15,7 @@ export function TeamsListing() { const searchParams = useCompatSearchParams(); const token = searchParams?.get("token"); const { t } = useLocale(); - const trpcContext = trpc.useContext(); + const trpcContext = trpc.useUtils(); const router = useRouter(); const [inviteTokenChecked, setInviteTokenChecked] = useState(false); diff --git a/packages/features/ee/teams/pages/team-appearance-view.tsx b/packages/features/ee/teams/pages/team-appearance-view.tsx index 4cc29f366d..01bf90efbd 100644 --- a/packages/features/ee/teams/pages/team-appearance-view.tsx +++ b/packages/features/ee/teams/pages/team-appearance-view.tsx @@ -28,7 +28,7 @@ type ProfileViewProps = { team: RouterOutputs["viewer"]["teams"]["get"] }; const ProfileView = ({ team }: ProfileViewProps) => { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [hideBrandingValue, setHideBrandingValue] = useState(team?.hideBranding ?? false); const [hideBookATeamMember, setHideBookATeamMember] = useState(team?.hideBookATeamMember ?? false); diff --git a/packages/features/ee/teams/pages/team-members-view.tsx b/packages/features/ee/teams/pages/team-members-view.tsx index d534118eb2..f314d0e357 100644 --- a/packages/features/ee/teams/pages/team-members-view.tsx +++ b/packages/features/ee/teams/pages/team-members-view.tsx @@ -11,7 +11,6 @@ import { MembershipRole } from "@calcom/prisma/enums"; import type { RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; import { Button, Meta, showToast, TextField } from "@calcom/ui"; -import { Icon } from "@calcom/ui"; import { getLayout } from "../../../settings/layouts/SettingsLayout"; import DisableTeamImpersonation from "../components/DisableTeamImpersonation"; @@ -82,7 +81,7 @@ const MembersView = () => { const router = useRouter(); const session = useSession(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const params = useParamsWithFallback(); const teamId = Number(params.id); diff --git a/packages/features/ee/teams/pages/team-profile-view.tsx b/packages/features/ee/teams/pages/team-profile-view.tsx index 2d31cf874e..78f9331c53 100644 --- a/packages/features/ee/teams/pages/team-profile-view.tsx +++ b/packages/features/ee/teams/pages/team-profile-view.tsx @@ -86,7 +86,7 @@ const ProfileView = () => { const teamId = Number(params.id); const { t } = useLocale(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const session = useSession(); useLayoutEffect(() => { @@ -249,7 +249,7 @@ const ProfileView = () => { export type TeamProfileFormProps = { team: RouterOutputs["viewer"]["teams"]["get"] }; const TeamProfileForm = ({ team }: TeamProfileFormProps) => { - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const { t } = useLocale(); const router = useRouter(); diff --git a/packages/features/ee/users/components/UsersTable.tsx b/packages/features/ee/users/components/UsersTable.tsx index 6a6234d60d..fc8bc52545 100644 --- a/packages/features/ee/users/components/UsersTable.tsx +++ b/packages/features/ee/users/components/UsersTable.tsx @@ -32,7 +32,7 @@ const FETCH_LIMIT = 25; function UsersTableBare() { const { t } = useLocale(); const tableContainerRef = useRef(null); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [searchTerm, setSearchTerm] = useState(""); const [showImpersonateModal, setShowImpersonateModal] = useState(false); const [selectedUser, setSelectedUser] = useState(null); diff --git a/packages/features/ee/users/pages/users-add-view.tsx b/packages/features/ee/users/pages/users-add-view.tsx index 44f3d8d1d0..9ebc493b05 100644 --- a/packages/features/ee/users/pages/users-add-view.tsx +++ b/packages/features/ee/users/pages/users-add-view.tsx @@ -14,7 +14,7 @@ import { userBodySchema } from "../schemas/userBodySchema"; const UsersAddView = () => { const pathname = usePathname(); const router = useRouter(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.users.add.useMutation({ onSuccess: async () => { showToast("User added successfully", "success"); diff --git a/packages/features/ee/users/pages/users-edit-view.tsx b/packages/features/ee/users/pages/users-edit-view.tsx index c4d6169f53..00ed0d7b92 100644 --- a/packages/features/ee/users/pages/users-edit-view.tsx +++ b/packages/features/ee/users/pages/users-edit-view.tsx @@ -30,7 +30,7 @@ const UsersEditView = ({ userId }: { userId: number }) => { const router = useRouter(); const [data] = trpc.viewer.users.get.useSuspenseQuery({ userId }); const { user } = data; - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const mutation = trpc.viewer.users.update.useMutation({ onSuccess: async () => { Promise.all([utils.viewer.users.list.invalidate(), utils.viewer.users.get.invalidate()]); diff --git a/packages/features/ee/workflows/components/DeleteDialog.tsx b/packages/features/ee/workflows/components/DeleteDialog.tsx index 4f888ab1f6..7e6b68506c 100644 --- a/packages/features/ee/workflows/components/DeleteDialog.tsx +++ b/packages/features/ee/workflows/components/DeleteDialog.tsx @@ -15,7 +15,7 @@ interface IDeleteDialog { export const DeleteDialog = (props: IDeleteDialog) => { const { t } = useLocale(); const { isOpenDialog, setIsOpenDialog, workflowId, additionalFunction } = props; - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const deleteMutation = trpc.viewer.workflows.delete.useMutation({ onSuccess: async () => { diff --git a/packages/features/ee/workflows/components/EventWorkflowsTab.tsx b/packages/features/ee/workflows/components/EventWorkflowsTab.tsx index 6a955a16ef..c643725171 100644 --- a/packages/features/ee/workflows/components/EventWorkflowsTab.tsx +++ b/packages/features/ee/workflows/components/EventWorkflowsTab.tsx @@ -43,7 +43,7 @@ const WorkflowListItem = (props: ItemProps) => { ); const isActive = activeEventTypeIds.includes(eventType.id); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const activateEventTypeMutation = trpc.viewer.workflows.activateEventType.useMutation({ onSuccess: async () => { diff --git a/packages/features/ee/workflows/components/WorkflowListPage.tsx b/packages/features/ee/workflows/components/WorkflowListPage.tsx index 5f67d3e343..925f1a179a 100644 --- a/packages/features/ee/workflows/components/WorkflowListPage.tsx +++ b/packages/features/ee/workflows/components/WorkflowListPage.tsx @@ -52,7 +52,7 @@ interface Props { } export default function WorkflowListPage({ workflows }: Props) { const { t } = useLocale(); - const utils = trpc.useContext(); + const utils = trpc.useUtils(); const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); const [workflowToDeleteId, setwWorkflowToDeleteId] = useState(0); const [parent] = useAutoAnimate(); @@ -252,12 +252,7 @@ export default function WorkflowListPage({ workflows }: Props) {
-