Skip to content

Scheduling infrastructure for absolutely everyone.

refactor: prevent mixed imports (#21500)

Omar Lópezd41dcc69ad99
diff --git a/packages/app-store/routing-forms/components/SingleForm.tsx b/packages/app-store/routing-forms/components/SingleForm.tsx
index 507593bfa7c..eb80f58aea5 100644
--- a/packages/app-store/routing-forms/components/SingleForm.tsx
+++ b/packages/app-store/routing-forms/components/SingleForm.tsx
@@ -18,7 +18,6 @@ import { FormActionsProvider } from "./FormActions";
import { InfoLostWarningDialog } from "./InfoLostWarningDialog";
import { Header } from "./_components/Header";
import { TestFormRenderer, type UptoDateForm } from "./_components/TestForm";
-import { getServerSidePropsForSingleFormView } from "./getServerSidePropsSingleForm";
const BREAKPOINTS = {
sm: 640,
@@ -244,5 +243,3 @@ export default function SingleFormWrapper({ form: _form, ...props }: SingleFormC
</LicenseRequired>
);
}
-
-export { getServerSidePropsForSingleFormView };
diff --git a/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx b/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx
index a3b07fab819..139fb7558d1 100644
--- a/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx
+++ b/packages/app-store/routing-forms/pages/form-edit/[...appPages].tsx
@@ -21,13 +21,11 @@ import { Icon } from "@calcom/ui/components/icon";
import type { inferSSRProps } from "@lib/types/inferSSRProps";
-import SingleForm, {
- getServerSidePropsForSingleFormView as getServerSideProps,
-} from "../../components/SingleForm";
+import SingleForm from "../../components/SingleForm";
+import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
import { FieldTypes } from "../../lib/FieldTypes";
import type { RoutingFormWithResponseCount } from "../../types/types";
-export { getServerSideProps };
type HookForm = UseFormReturn<RoutingFormWithResponseCount>;
function Field({
diff --git a/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx b/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx
index be7c1bb2e9a..81c56af6f7f 100644
--- a/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx
+++ b/packages/app-store/routing-forms/pages/incomplete-booking/[...appPages].tsx
@@ -18,9 +18,8 @@ import { Label } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { showToast } from "@calcom/ui/components/toast";
-import SingleForm, {
- getServerSidePropsForSingleFormView as getServerSideProps,
-} from "../../components/SingleForm";
+import SingleForm from "../../components/SingleForm";
+import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
import type { RoutingFormWithResponseCount } from "../../types/types";
function Page({ form }: { form: RoutingFormWithResponseCount }) {
@@ -331,5 +330,3 @@ export default function IncompleteBookingPage({
/>
);
}
-
-export { getServerSideProps };
diff --git a/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx b/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx
index 930b697b148..c5b304b8503 100644
--- a/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx
+++ b/packages/app-store/routing-forms/pages/reporting/[...appPages].tsx
@@ -15,13 +15,12 @@ import { useInViewObserver } from "@calcom/lib/hooks/useInViewObserver";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
-import { showToast } from "@calcom/ui/components/toast";
-import { Button } from "@calcom/ui/components/button";
import classNames from "@calcom/ui/classNames";
+import { Button } from "@calcom/ui/components/button";
+import { showToast } from "@calcom/ui/components/toast";
-import SingleForm, {
- getServerSidePropsForSingleFormView as getServerSideProps,
-} from "../../components/SingleForm";
+import SingleForm from "../../components/SingleForm";
+import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
import {
withRaqbSettingsAndWidgets,
ConfigFor,
@@ -32,8 +31,6 @@ import {
type FormFieldsQueryBuilderConfigWithRaqbFields,
} from "../../lib/getQueryBuilderConfig";
-export { getServerSideProps };
-
const Result = ({
formName,
formId,
diff --git a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx
index 14dc174beea..8dfc34538e1 100644
--- a/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx
+++ b/packages/app-store/routing-forms/pages/route-builder/[...appPages].tsx
@@ -32,11 +32,10 @@ import { Icon } from "@calcom/ui/components/icon";
import { routingFormAppComponents } from "../../appComponents";
import DynamicAppComponent from "../../components/DynamicAppComponent";
-import SingleForm, {
- getServerSidePropsForSingleFormView as getServerSideProps,
-} from "../../components/SingleForm";
+import SingleForm from "../../components/SingleForm";
import { EmptyState } from "../../components/_components/EmptyState";
import { RoutingSkeleton } from "../../components/_components/RoutingSkeleton";
+import type { getServerSidePropsForSingleFormView as getServerSideProps } from "../../components/getServerSidePropsSingleForm";
import {
withRaqbSettingsAndWidgets,
ConfigFor,
@@ -1443,5 +1442,3 @@ export default function RouteBuilder({
</>
);
}
-
-export { getServerSideProps };
diff --git a/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx b/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx
index fa9573fa5c0..0b81f99a781 100644
--- a/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx
+++ b/packages/app-store/routing-forms/pages/routing-link/[...appPages].tsx
@@ -26,7 +26,7 @@ import { findMatchingRoute } from "../../lib/processRoute";
import { substituteVariables } from "../../lib/substituteVariables";
import { getFieldResponseForJsonLogic } from "../../lib/transformResponse";
import type { NonRouterRoute, FormResponse } from "../../types/types";
-import { getServerSideProps } from "./getServerSideProps";
+import type { getServerSideProps } from "./getServerSideProps";
import { getUrlSearchParamsToForward } from "./getUrlSearchParamsToForward";
type Props = inferSSRProps<typeof getServerSideProps>;
@@ -221,8 +221,6 @@ export default function RoutingLink(props: inferSSRProps<typeof getServerSidePro
return <RoutingForm {...props} />;
}
-export { getServerSideProps };
-
const usePrefilledResponse = (form: Props["form"]) => {
const searchParams = useCompatSearchParams();
const prefillResponse: FormResponse = {};