From 7a28e1d6f4e8d6cea2d445e561d79ccdc0d3ff22 Mon Sep 17 00:00:00 2001 From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:15:09 +0530 Subject: [PATCH] fix: display provider name instead of url (#6914) Signed-off-by: Udit Takkar --- apps/web/pages/booking/[uid].tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsx index 870936f794..e58b853aa5 100644 --- a/apps/web/pages/booking/[uid].tsx +++ b/apps/web/pages/booking/[uid].tsx @@ -11,7 +11,11 @@ import { RRule } from "rrule"; import { z } from "zod"; import BookingPageTagManager from "@calcom/app-store/BookingPageTagManager"; -import { getEventLocationValue, getSuccessPageLocationMessage } from "@calcom/app-store/locations"; +import { + getEventLocationValue, + getSuccessPageLocationMessage, + guessEventLocationType, +} from "@calcom/app-store/locations"; import { getEventTypeAppData } from "@calcom/app-store/utils"; import { getEventName } from "@calcom/core/event"; import dayjs, { ConfigType } from "@calcom/dayjs"; @@ -37,7 +41,7 @@ import { Prisma } from "@calcom/prisma/client"; import { bookingMetadataSchema } from "@calcom/prisma/zod-utils"; import { customInputSchema, EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; import { Button, EmailInput, HeadSeo } from "@calcom/ui"; -import { FiX, FiChevronLeft, FiCheck, FiCalendar } from "@calcom/ui/components/icon"; +import { FiX, FiExternalLink, FiChevronLeft, FiCheck, FiCalendar } from "@calcom/ui/components/icon"; import { timeZone } from "@lib/clock"; import { inferSSRProps } from "@lib/types/inferSSRProps"; @@ -346,6 +350,7 @@ export default function Success(props: SuccessProps) { eventType.workflows.find((workflowEventType) => workflowEventType.workflow.steps.find((step) => step.action === WorkflowActions.SMS_ATTENDEE) ) !== undefined; + const providerName = guessEventLocationType(location)?.label; return (
@@ -498,8 +503,14 @@ export default function Success(props: SuccessProps) {
{t("where")}
{locationToDisplay.startsWith("http") ? ( - - {locationToDisplay} + + {providerName || "Link"} + ) : ( locationToDisplay