Scheduling infrastructure for absolutely everyone.
fix: display provider name instead of url (#6914)
Udit Takkar7a28e1d6f4e8
diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsxindex 870936f794e..e58b853aa5f 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 (<div className={isEmbed ? "" : "h-screen"} data-testid="success-page">@@ -498,8 +503,14 @@ export default function Success(props: SuccessProps) {<div className="mt-3 font-medium">{t("where")}</div><div className="col-span-2 mt-3">{locationToDisplay.startsWith("http") ? (- <a title="Meeting Link" href={locationToDisplay}>- {locationToDisplay}+ <a+ href={locationToDisplay}+ target="_blank"+ title={locationToDisplay}+ className="flex items-center gap-2 text-gray-700 underline dark:text-gray-50"+ rel="noreferrer">+ {providerName || "Link"}+ <FiExternalLink className="inline h-4 w-4 text-gray-700 dark:text-white" /></a>) : (locationToDisplay