refactor: prevent mixed imports (#21500)
Signed-off-by: Omar López <zomars@me.com>
This commit is contained in:
@@ -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 };
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user