From ae38027d76316f048c34f01b6ee0ace0e0fb20b5 Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Tue, 24 Dec 2024 18:19:37 +0100 Subject: [PATCH] chore: added routing support link (#18369) * Added routing form support link * small change * Type fix --------- Co-authored-by: Joe Au-Yeung --- .../routing-forms/components/SingleForm.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/app-store/routing-forms/components/SingleForm.tsx b/packages/app-store/routing-forms/components/SingleForm.tsx index d7f19b3eff..8c4d73057e 100644 --- a/packages/app-store/routing-forms/components/SingleForm.tsx +++ b/packages/app-store/routing-forms/components/SingleForm.tsx @@ -8,10 +8,12 @@ import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequir import AddMembersWithSwitch from "@calcom/features/eventtypes/components/AddMembersWithSwitch"; import { ShellMain } from "@calcom/features/shell/Shell"; import cn from "@calcom/lib/classNames"; +import { IS_CALCOM } from "@calcom/lib/constants"; import useApp from "@calcom/lib/hooks/useApp"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc, TRPCClientError } from "@calcom/trpc/react"; +import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import type { Brand } from "@calcom/types/utils"; import { @@ -676,6 +678,8 @@ export const TestFormDialog = ({ function SingleForm({ form, appUrl, Page, enrichedWithUserProfileForm }: SingleFormComponentProps) { const utils = trpc.useUtils(); const { t } = useLocale(); + const { data: user } = useMeQuery(); + const [isTestPreviewOpen, setIsTestPreviewOpen] = useState(false); const [skipFirstUpdate, setSkipFirstUpdate] = useState(true); const hookForm = useFormContext(); @@ -898,13 +902,27 @@ function SingleForm({ form, appUrl, Page, enrichedWithUserProfileForm }: SingleF ) : null} -
+
+ {IS_CALCOM && ( + + + + )}
{form.routes?.every(isFallbackRoute) && (