fix: use destination calendar email (#6886)
* fix: use destination calendar email to display correct primary email Signed-off-by: Udit Takkar <[email protected]> * fix: simplify logic Signed-off-by: Udit Takkar <[email protected]> --------- Signed-off-by: Udit Takkar <[email protected]>
This commit is contained in:
1 parent
39040fca9a
commit
6877d0f693
2 files changed
+10
-4
No files matched your search
@@ -119,7 +119,7 @@ const DestinationCalendarSelector = ({
|
||||
|
||||
// Get primary calendar, which is shown in the placeholder since this is the calendar that will
|
||||
// be used when no destination calendar is selected.
|
||||
const primaryCalendar = query.data.connectedCalendars.filter((cal) => Boolean(cal.primary))[0];
|
||||
const primaryCalendar = query.data.destinationCalendarEmail;
|
||||
|
||||
return (
|
||||
<div className="relative" title={`${t("select_destination_calendar")}: ${selectedOption?.label || ""}`}>
|
||||
@@ -130,8 +130,7 @@ const DestinationCalendarSelector = ({
|
||||
`${t("select_destination_calendar")}`
|
||||
) : (
|
||||
<span>
|
||||
{t("default_calendar_selected")}{" "}
|
||||
{primaryCalendar?.primary?.externalId && `(${primaryCalendar?.primary?.externalId})`}
|
||||
{t("default_calendar_selected")} {primaryCalendar && `(${primaryCalendar})`}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user