[#296] removed old condition that is no longer needed (#305)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-11-12 20:57:16 +01:00
committed by GitHub
parent 1bb24b2672
commit 3c26a81773
2 changed files with 2 additions and 6 deletions
@@ -40,8 +40,9 @@ function CalendarAccordion({
const allCalendars = useAppSelector((state) => state.calendars.list);
const [expended, setExpended] = useState(defaultExpanded);
if (calendars.length === 0 && !showAddButton) return null;
useEffect(() => setExpended(defaultExpanded), [defaultExpanded]);
if (calendars.length === 0 && !showAddButton) return null;
return (
<Accordion
defaultExpanded={defaultExpanded}
@@ -65,11 +65,6 @@ export function EventChip({
// Determine owner attendee
const ownerAttendee = getOwnerAttendee(attendees, ownerEmails);
// Handle non-owner attendee case
if (attendees.length && !delegated && !ownerAttendee) {
return <SimpleEventChip title={event.title} />;
}
// Color and contrast logic
const bestColor = getBestColor(
(calendar.color as { light: string; dark: string }) ?? {