From d29deedc90dfd5df10502799be4853d6e10e4567 Mon Sep 17 00:00:00 2001 From: Cosmo Date: Wed, 22 Apr 2026 19:30:03 +0000 Subject: [PATCH] fix: upcoming panel as slide-out overlay to prevent layout overflow on tablets --- components/CalendarTab.tsx | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/components/CalendarTab.tsx b/components/CalendarTab.tsx index 8f809b7..52d7fcb 100644 --- a/components/CalendarTab.tsx +++ b/components/CalendarTab.tsx @@ -1,6 +1,6 @@ 'use client' import { useState, useEffect, useMemo } from 'react' -import { ChevronLeft, ChevronRight, Plus, X, Clock, MapPin, Trash2, Eye, EyeOff, CalendarDays, User, AlignLeft } from 'lucide-react' +import { ChevronLeft, ChevronRight, Plus, X, Clock, MapPin, Trash2, Eye, EyeOff, CalendarDays, User, AlignLeft, List } from 'lucide-react' interface CalendarEvent { id: string @@ -350,6 +350,7 @@ export default function CalendarTab() { const [addDate, setAddDate] = useState('') const [hiddenOwners, setHiddenOwners] = useState>(new Set()) const [dayPopover, setDayPopover] = useState<{ day: number; events: CalendarEvent[] } | null>(null) + const [showUpcoming, setShowUpcoming] = useState(false) useEffect(() => { setLoading(true) @@ -431,7 +432,7 @@ export default function CalendarTab() { } return ( -
+
{/* Main calendar grid */}
{/* Header */} @@ -469,6 +470,16 @@ export default function CalendarTab() { ) })} +
- {/* Right panel */} + {/* Right panel — overlay */} + {showUpcoming &&
setShowUpcoming(false)} />}
Ближайшие
{upcoming.length === 0 && !loading && (