setUser(u)}/>;
const activeTool = TOOLS.find(t=>t.id===active);
diff --git a/frontend/src/calendar.jsx b/frontend/src/calendar.jsx
index a009321..05dcaa4 100644
--- a/frontend/src/calendar.jsx
+++ b/frontend/src/calendar.jsx
@@ -122,6 +122,9 @@ export default function CalendarWidget() {
};
const refresh = () => { api('/calendar/feeds').then(f=>{ setFeeds(f); loadFeeds(f); }).catch(()=>{}); };
+ // Load on mount so next event shows without opening
+ useEffect(() => { refresh(); }, []);
+ // Reload when opened
useEffect(() => { if (isOpen) refresh(); }, [isOpen]);
// Nächster oder aktueller Termin (für zugeklappte Ansicht)
@@ -155,9 +158,27 @@ export default function CalendarWidget() {
{/* Header */}
{isOpen && feeds.length > 0 && (
@@ -170,23 +191,7 @@ export default function CalendarWidget() {
)}
- {/* Nächster Termin auch im zugeklappten Zustand */}
- {!isOpen && nextEvent && (
-
-
-
-
{nextEvent.summary}
-
- {nextEvent.allDay
- ? nextEvent.dtstart.toLocaleDateString('de-DE',{weekday:'short',day:'numeric',month:'short'})
- : `${nextEvent.dtstart.toLocaleDateString('de-DE',{weekday:'short',day:'numeric',month:'short'})} ${nextEvent.dtstart.toLocaleTimeString('de-DE',{hour:'2-digit',minute:'2-digit'})}`
- }
-
-
-
- )}
+
{isOpen && (
@@ -210,20 +215,18 @@ export default function CalendarWidget() {
{MONTHS[cur.m]} {cur.y}
- {(cur.m !== today.getMonth() || cur.y !== today.getFullYear()) && (
-
- )}
+