From 8431cd2ef84d8fb93867c4d28e5d2b9e6a17db77 Mon Sep 17 00:00:00 2001 From: Somay Chauhan Date: Mon, 30 Sep 2024 13:41:13 +0530 Subject: [PATCH] refactor: event recurring web wrapper (#16764) --- .../components/tabs/recurring/EventRecurringTab.tsx | 4 ++-- .../event-types/wrappers/EventRecurringWebWrapper.tsx | 10 ++++++++++ .../atoms/event-types/wrappers/EventTypeWebWrapper.tsx | 4 +--- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 packages/platform/atoms/event-types/wrappers/EventRecurringWebWrapper.tsx diff --git a/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx b/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx index 1aba6b113a..2a2aec5d87 100644 --- a/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx +++ b/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx @@ -1,9 +1,9 @@ -import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; +import type { EventRecurringWebWrapperProps } from "@calcom/atoms/event-types/wrappers/EventRecurringWebWrapper"; import getPaymentAppData from "@calcom/lib/getPaymentAppData"; import RecurringEventController from "./RecurringEventController"; -export const EventRecurringTab = ({ eventType }: Pick) => { +export const EventRecurringTab = ({ eventType }: EventRecurringWebWrapperProps) => { const paymentAppData = getPaymentAppData(eventType); const requirePayment = paymentAppData.price > 0; diff --git a/packages/platform/atoms/event-types/wrappers/EventRecurringWebWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventRecurringWebWrapper.tsx new file mode 100644 index 0000000000..5061a9a4e3 --- /dev/null +++ b/packages/platform/atoms/event-types/wrappers/EventRecurringWebWrapper.tsx @@ -0,0 +1,10 @@ +import { EventRecurringTab } from "@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab"; +import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; + +export type EventRecurringWebWrapperProps = Pick; + +const EventRecurringWebWrapper = (props: EventRecurringWebWrapperProps) => { + return ; +}; + +export default EventRecurringWebWrapper; diff --git a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx index f103dd0b60..bed8751257 100644 --- a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx +++ b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx @@ -68,9 +68,7 @@ const EventInstantTab = dynamic(() => const EventRecurringTab = dynamic(() => // import web wrapper when it's ready - import("@calcom/features/eventtypes/components/tabs/recurring/EventRecurringTab").then( - (mod) => mod.EventRecurringTab - ) + import("./EventRecurringWebWrapper").then((mod) => mod) ); const EventAppsTab = dynamic(() =>