Skip to content

Commit d41dcc6

Browse files
authored
refactor: prevent mixed imports (calcom#21500)
Signed-off-by: Omar López <zomars@me.com>
1 parent 0a28b58 commit d41dcc6

6 files changed

Lines changed: 11 additions & 27 deletions

File tree

packages/app-store/routing-forms/components/SingleForm.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { FormActionsProvider } from "./FormActions";
1818
import { InfoLostWarningDialog } from "./InfoLostWarningDialog";
1919
import { Header } from "./_components/Header";
2020
import { TestFormRenderer, type UptoDateForm } from "./_components/TestForm";
21-
import { getServerSidePropsForSingleFormView } from "./getServerSidePropsSingleForm";
2221

2322
const BREAKPOINTS = {
2423
sm: 640,
@@ -244,5 +243,3 @@ export default function SingleFormWrapper({ form: _form, ...props }: SingleFormC
244243
</LicenseRequired>
245244
);
246245
}
247-
248-
export { getServerSidePropsForSingleFormView };

packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ import { Icon } from "@calcom/ui/components/icon";
2121

2222
import type { inferSSRProps } from "@lib/types/inferSSRProps";
2323

24-
import SingleForm, {
25-
getServerSidePropsForSingleFormView as getServerSideProps,
26-
} from "../../components/SingleForm";
24+
import SingleForm from "../../components/SingleForm";
25+
import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
2726
import { FieldTypes } from "../../lib/FieldTypes";
2827
import type { RoutingFormWithResponseCount } from "../../types/types";
2928

30-
export { getServerSideProps };
3129
type HookForm = UseFormReturn<RoutingFormWithResponseCount>;
3230

3331
function Field({

packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ import { Label } from "@calcom/ui/components/form";
1818
import { Icon } from "@calcom/ui/components/icon";
1919
import { showToast } from "@calcom/ui/components/toast";
2020

21-
import SingleForm, {
22-
getServerSidePropsForSingleFormView as getServerSideProps,
23-
} from "../../components/SingleForm";
21+
import SingleForm from "../../components/SingleForm";
22+
import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
2423
import type { RoutingFormWithResponseCount } from "../../types/types";
2524

2625
function Page({ form }: { form: RoutingFormWithResponseCount }) {
@@ -331,5 +330,3 @@ export default function IncompleteBookingPage({
331330
/>
332331
);
333332
}
334-
335-
export { getServerSideProps };

packages/app-store/routing-forms/pages/reporting/[...appPages].tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ import { useInViewObserver } from "@calcom/lib/hooks/useInViewObserver";
1515
import { useLocale } from "@calcom/lib/hooks/useLocale";
1616
import { trpc } from "@calcom/trpc/react";
1717
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
18-
import { showToast } from "@calcom/ui/components/toast";
19-
import { Button } from "@calcom/ui/components/button";
2018
import classNames from "@calcom/ui/classNames";
19+
import { Button } from "@calcom/ui/components/button";
20+
import { showToast } from "@calcom/ui/components/toast";
2121

22-
import SingleForm, {
23-
getServerSidePropsForSingleFormView as getServerSideProps,
24-
} from "../../components/SingleForm";
22+
import SingleForm from "../../components/SingleForm";
23+
import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
2524
import {
2625
withRaqbSettingsAndWidgets,
2726
ConfigFor,
@@ -32,8 +31,6 @@ import {
3231
type FormFieldsQueryBuilderConfigWithRaqbFields,
3332
} from "../../lib/getQueryBuilderConfig";
3433

35-
export { getServerSideProps };
36-
3734
const Result = ({
3835
formName,
3936
formId,

packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ import { Icon } from "@calcom/ui/components/icon";
3232

3333
import { routingFormAppComponents } from "../../appComponents";
3434
import DynamicAppComponent from "../../components/DynamicAppComponent";
35-
import SingleForm, {
36-
getServerSidePropsForSingleFormView as getServerSideProps,
37-
} from "../../components/SingleForm";
35+
import SingleForm from "../../components/SingleForm";
3836
import { EmptyState } from "../../components/_components/EmptyState";
3937
import { RoutingSkeleton } from "../../components/_components/RoutingSkeleton";
38+
import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
4039
import {
4140
withRaqbSettingsAndWidgets,
4241
ConfigFor,
@@ -1443,5 +1442,3 @@ export default function RouteBuilder({
14431442
</>
14441443
);
14451444
}
1446-
1447-
export { getServerSideProps };

packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { findMatchingRoute } from "../../lib/processRoute";
2626
import { substituteVariables } from "../../lib/substituteVariables";
2727
import { getFieldResponseForJsonLogic } from "../../lib/transformResponse";
2828
import type { NonRouterRoute, FormResponse } from "../../types/types";
29-
import { getServerSideProps } from "./getServerSideProps";
29+
import type { getServerSideProps } from "./getServerSideProps";
3030
import { getUrlSearchParamsToForward } from "./getUrlSearchParamsToForward";
3131

3232
type Props = inferSSRProps<typeof getServerSideProps>;
@@ -221,8 +221,6 @@ export default function RoutingLink(props: inferSSRProps<typeof getServerSidePro
221221
return <RoutingForm {...props} />;
222222
}
223223

224-
export { getServerSideProps };
225-
226224
const usePrefilledResponse = (form: Props["form"]) => {
227225
const searchParams = useCompatSearchParams();
228226
const prefillResponse: FormResponse = {};

0 commit comments

Comments
 (0)