Scheduling infrastructure for absolutely everyone.
fix: Fixed email embed for team when specific times are chosen embeds the wrong URL (#14975)
vikrant845039bf6d4e36a
diff --git a/packages/features/embed/Embed.tsx b/packages/features/embed/Embed.tsxindex 8134f4e1adc..9cf1f7310eb 100644--- a/packages/features/embed/Embed.tsx+++ b/packages/features/embed/Embed.tsx@@ -418,7 +418,13 @@ const EmailEmbedPreview = ({<tr style={{ height: "25px" }}>{selectedDateAndTime[key]?.length > 0 &&selectedDateAndTime[key].map((time) => {- const bookingURL = `${WEBSITE_URL}/${username}/${eventType.slug}?duration=${eventType.length}&date=${key}&month=${month}&slot=${time}`;+ // If teamId is present on eventType and is not null, it means it is a team event.+ // So we add 'team/' to the url.+ const bookingURL = `${WEBSITE_URL}/${+ eventType.teamId !== null ? "team/" : ""+ }${username}/${eventType.slug}?duration=${+ eventType.length+ }&date=${key}&month=${month}&slot=${time}`;return (<tdkey={time}