fix: routing form redirects to use app.cal.com instead of cal.com (#21924)

* fix: routing form redirects to use app.cal.com instead of cal.com

* Update packages/lib/hooks/useBookerUrl.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* update

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Anik Dhabal Babuandcubic-dev-ai[bot] authored and GitHub committed 2025-06-20 17:22:53 +05:30
1 parent 12cb94950a
commit 3714d5faab
5 files changed
+18 -13

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
import type { BookerLayout } from "@calcom/features/bookings/Booker/types";
import { APP_NAME } from "@calcom/lib/constants";
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useEmbedBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { TextArea } from "@calcom/ui/components/form";
@@ -188,7 +188,7 @@ ${getEmbedTypeSpecificString({
HTMLIFrameElement | HTMLTextAreaElement | null,
{ calLink: string; embedType: EmbedType; previewState: PreviewState; namespace: string }
>(function Preview({ calLink, embedType }, ref) {
const bookerUrl = useBookerUrl();
const bookerUrl = useEmbedBookerUrl();
const iframeSrc = `${EMBED_PREVIEW_HTML_URL}?embedType=${embedType}&calLink=${calLink}&embedLibUrl=${embedLibUrl}&bookerUrl=${bookerUrl}`;
if (ref instanceof Function || !ref) {
return null;
@@ -329,7 +329,7 @@ const getInstructionString = ({
};
function useGetEmbedSnippetString(namespace: string | null) {
const bookerUrl = useBookerUrl();
const bookerUrl = useEmbedBookerUrl();
// TODO: Import this string from @calcom/embed-snippet
// Right now the problem is that embed-snippet export is not minified and has comments which makes it unsuitable for giving it to users.
// If we can minify that during build time and then import the built code here, that could work
+2 -2
View File
@@ -1,4 +1,4 @@
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useEmbedBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useLocale } from "@calcom/lib/hooks/useLocale";
export const useEmbedTypes = () => {
@@ -319,6 +319,6 @@ export const useEmbedTypes = () => {
};
export const useEmbedCalOrigin = () => {
const bookerUrl = useBookerUrl();
const bookerUrl = useEmbedBookerUrl();
return bookerUrl;
};