refactor: event recurring web wrapper (#16764)
This commit is contained in:
@@ -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<EventTypeSetupProps, "eventType">) => {
|
||||
export const EventRecurringTab = ({ eventType }: EventRecurringWebWrapperProps) => {
|
||||
const paymentAppData = getPaymentAppData(eventType);
|
||||
|
||||
const requirePayment = paymentAppData.price > 0;
|
||||
|
||||
@@ -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<EventTypeSetupProps, "eventType">;
|
||||
|
||||
const EventRecurringWebWrapper = (props: EventRecurringWebWrapperProps) => {
|
||||
return <EventRecurringTab {...props} />;
|
||||
};
|
||||
|
||||
export default EventRecurringWebWrapper;
|
||||
@@ -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(() =>
|
||||
|
||||
Reference in New Issue
Block a user