fix: slots in email embed sorted (#25676)
* fix: slots in email embed sorted * fix: removed mutating of original array * fix: incorrect access of sortedTimes --------- Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com>
This commit is contained in:
1 parent
6e5b812286
commit
d8ddb466b0
1 file changed
+4
-3
@@ -539,7 +539,8 @@ const EmailEmbedPreview = ({
|
||||
Object.keys(selectedDateAndTime)
|
||||
.sort()
|
||||
.map((key) => {
|
||||
const firstSlotOfSelectedDay = selectedDateAndTime[key][0];
|
||||
const sortedTimes = [...selectedDateAndTime[key]].sort();
|
||||
const firstSlotOfSelectedDay = sortedTimes[0];
|
||||
const selectedDate = dayjs(firstSlotOfSelectedDay)
|
||||
.tz(timezone)
|
||||
.format("dddd, MMMM D, YYYY");
|
||||
@@ -573,8 +574,8 @@ const EmailEmbedPreview = ({
|
||||
<table style={{ borderCollapse: "separate", borderSpacing: "0px 4px" }}>
|
||||
<tbody>
|
||||
<tr style={{ height: "25px" }}>
|
||||
{selectedDateAndTime[key]?.length > 0 &&
|
||||
selectedDateAndTime[key].map((time) => {
|
||||
{sortedTimes?.length > 0 &&
|
||||
sortedTimes.map((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 = `${eventType.bookerUrl}/${
|
||||
|
||||
Reference in new issue
Block a user