diff --git a/src/components/Calendar/CalendarSelection.tsx b/src/components/Calendar/CalendarSelection.tsx index e2ee2a6..72fea17 100644 --- a/src/components/Calendar/CalendarSelection.tsx +++ b/src/components/Calendar/CalendarSelection.tsx @@ -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 ( ; - } - // Color and contrast logic const bestColor = getBestColor( (calendar.color as { light: string; dark: string }) ?? {