Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed email embed for team when specific times are chosen embeds the wrong URL #14889

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/features/embed/Embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 the eventType object, it means that this is a team event
// And hence we add 'team/' to the bookingUrl.
const bookingURL = `${WEBSITE_URL}/${
eventType.teamId !== null ? "team/" : ""
}${username}/${eventType.slug}?duration=${
eventType.length
}&date=${key}&month=${month}&slot=${time}`;
return (
<td
key={time}
Expand Down