Spaces:
Running
Running
Update calendar
Browse files- src/pages/Calendar.tsx +242 -124
src/pages/Calendar.tsx
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
import { useState } from "react";
|
|
|
|
| 2 |
import conferencesData from "@/data/conferences.yml";
|
| 3 |
import { Conference } from "@/types/conference";
|
| 4 |
-
import { Calendar as CalendarIcon, Tag, CircleDot } from "lucide-react";
|
| 5 |
import { Calendar } from "@/components/ui/calendar";
|
| 6 |
import { parseISO, format, isValid, isSameMonth } from "date-fns";
|
| 7 |
|
| 8 |
const CalendarPage = () => {
|
| 9 |
const [selectedDate, setSelectedDate] = useState<Date | undefined>(new Date());
|
|
|
|
|
|
|
| 10 |
|
| 11 |
// Handle month change
|
| 12 |
const handleMonthChange = (date: Date) => {
|
|
@@ -14,9 +17,14 @@ const CalendarPage = () => {
|
|
| 14 |
};
|
| 15 |
|
| 16 |
// Helper function to safely parse dates
|
| 17 |
-
const safeParseISO = (dateString: string | undefined | number): Date | null => {
|
| 18 |
if (!dateString || dateString === 'TBD') return null;
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
const dateStr = typeof dateString === 'number' ? dateString.toString() : dateString;
|
| 21 |
|
| 22 |
try {
|
|
@@ -36,11 +44,66 @@ const CalendarPage = () => {
|
|
| 36 |
|
| 37 |
return isValid(parsedDate) ? parsedDate : null;
|
| 38 |
} catch (error) {
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
| 40 |
return null;
|
| 41 |
}
|
| 42 |
};
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
// Get all events (conferences and deadlines) for a given month
|
| 45 |
const getMonthEvents = (date: Date) => {
|
| 46 |
return conferencesData.filter((conf: Conference) => {
|
|
@@ -71,7 +134,7 @@ const CalendarPage = () => {
|
|
| 71 |
});
|
| 72 |
};
|
| 73 |
|
| 74 |
-
//
|
| 75 |
const getDatesWithEvents = () => {
|
| 76 |
const dates = {
|
| 77 |
conferences: new Set<string>(),
|
|
@@ -79,22 +142,55 @@ const CalendarPage = () => {
|
|
| 79 |
};
|
| 80 |
|
| 81 |
conferencesData.forEach((conf: Conference) => {
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
}
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
-
} else if (startDate) {
|
| 97 |
-
dates.conferences.add(format(startDate, 'yyyy-MM-dd'));
|
| 98 |
}
|
| 99 |
});
|
| 100 |
|
|
@@ -107,118 +203,140 @@ const CalendarPage = () => {
|
|
| 107 |
const monthEvents = selectedDate ? getMonthEvents(selectedDate) : [];
|
| 108 |
const datesWithEvents = getDatesWithEvents();
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
<div className="mt-4 space-y-2">
|
| 160 |
-
<div className="flex justify-center gap-6 mb-6">
|
| 161 |
-
<div className="flex items-center gap-2">
|
| 162 |
-
<CircleDot className="h-4 w-4 text-purple-600" />
|
| 163 |
-
<span>Conference Dates</span>
|
| 164 |
-
</div>
|
| 165 |
-
<div className="flex items-center gap-2">
|
| 166 |
-
<CircleDot className="h-4 w-4 text-red-500" />
|
| 167 |
-
<span>Submission Deadlines</span>
|
| 168 |
</div>
|
| 169 |
</div>
|
| 170 |
-
|
| 171 |
</div>
|
|
|
|
|
|
|
|
|
|
| 172 |
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
</div>
|
| 219 |
-
|
| 220 |
</div>
|
| 221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
</div>
|
| 223 |
</div>
|
| 224 |
);
|
|
|
|
| 1 |
import { useState } from "react";
|
| 2 |
+
import Header from "@/components/Header";
|
| 3 |
import conferencesData from "@/data/conferences.yml";
|
| 4 |
import { Conference } from "@/types/conference";
|
| 5 |
+
import { Calendar as CalendarIcon, Tag, CircleDot, Globe, Clock } from "lucide-react";
|
| 6 |
import { Calendar } from "@/components/ui/calendar";
|
| 7 |
import { parseISO, format, isValid, isSameMonth } from "date-fns";
|
| 8 |
|
| 9 |
const CalendarPage = () => {
|
| 10 |
const [selectedDate, setSelectedDate] = useState<Date | undefined>(new Date());
|
| 11 |
+
const [hoveredDate, setHoveredDate] = useState<Date | undefined>(undefined);
|
| 12 |
+
const [searchQuery, setSearchQuery] = useState("");
|
| 13 |
|
| 14 |
// Handle month change
|
| 15 |
const handleMonthChange = (date: Date) => {
|
|
|
|
| 17 |
};
|
| 18 |
|
| 19 |
// Helper function to safely parse dates
|
| 20 |
+
const safeParseISO = (dateString: string | undefined | number | Date): Date | null => {
|
| 21 |
if (!dateString || dateString === 'TBD') return null;
|
| 22 |
|
| 23 |
+
// If it's already a Date object, return it
|
| 24 |
+
if (dateString instanceof Date) {
|
| 25 |
+
return isValid(dateString) ? dateString : null;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
const dateStr = typeof dateString === 'number' ? dateString.toString() : dateString;
|
| 29 |
|
| 30 |
try {
|
|
|
|
| 44 |
|
| 45 |
return isValid(parsedDate) ? parsedDate : null;
|
| 46 |
} catch (error) {
|
| 47 |
+
// Only log error if it's not already a Date object
|
| 48 |
+
if (!(dateString instanceof Date)) {
|
| 49 |
+
console.error("Error parsing date:", dateString);
|
| 50 |
+
}
|
| 51 |
return null;
|
| 52 |
}
|
| 53 |
};
|
| 54 |
|
| 55 |
+
// Get events for a specific date
|
| 56 |
+
const getEventsForDate = (date: Date) => {
|
| 57 |
+
return conferencesData.filter((conf: Conference) => {
|
| 58 |
+
const deadlineDate = safeParseISO(conf.deadline);
|
| 59 |
+
|
| 60 |
+
// Parse conference dates from the 'date' field
|
| 61 |
+
let startDate = null;
|
| 62 |
+
let endDate = null;
|
| 63 |
+
|
| 64 |
+
if (conf.date) {
|
| 65 |
+
const dates = conf.date.split(/[-–]/); // Split on both hyphen types
|
| 66 |
+
const startDateStr = dates[0].trim();
|
| 67 |
+
const endDateMatch = dates[1]?.match(/(\d+),?\s*(\d{4})/);
|
| 68 |
+
|
| 69 |
+
// Parse start date
|
| 70 |
+
const startMatch = startDateStr.match(/([A-Za-z]+)\s+(\d+)/);
|
| 71 |
+
if (startMatch) {
|
| 72 |
+
const [_, month, day] = startMatch;
|
| 73 |
+
const year = endDateMatch ? endDateMatch[2] : startDateStr.match(/\d{4}/)?.[0];
|
| 74 |
+
if (year) {
|
| 75 |
+
startDate = new Date(`${year}-${month}-${day.padStart(2, '0')}`);
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
// Parse end date if it exists
|
| 80 |
+
if (endDateMatch) {
|
| 81 |
+
const [_, day, year] = endDateMatch;
|
| 82 |
+
const month = startMatch?.[1]; // Use same month as start date
|
| 83 |
+
if (month) {
|
| 84 |
+
endDate = new Date(`${year}-${month}-${day.padStart(2, '0')}`);
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
const isDeadlineOnDate = deadlineDate &&
|
| 90 |
+
format(deadlineDate, 'yyyy-MM-dd') === format(date, 'yyyy-MM-dd');
|
| 91 |
+
|
| 92 |
+
let isConferenceOnDate = false;
|
| 93 |
+
if (startDate && endDate) {
|
| 94 |
+
const currentDate = new Date(date);
|
| 95 |
+
currentDate.setHours(0, 0, 0, 0);
|
| 96 |
+
startDate.setHours(0, 0, 0, 0);
|
| 97 |
+
endDate.setHours(0, 0, 0, 0);
|
| 98 |
+
isConferenceOnDate = currentDate >= startDate && currentDate <= endDate;
|
| 99 |
+
} else if (startDate) {
|
| 100 |
+
isConferenceOnDate = format(startDate, 'yyyy-MM-dd') === format(date, 'yyyy-MM-dd');
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
return isDeadlineOnDate || isConferenceOnDate;
|
| 104 |
+
});
|
| 105 |
+
};
|
| 106 |
+
|
| 107 |
// Get all events (conferences and deadlines) for a given month
|
| 108 |
const getMonthEvents = (date: Date) => {
|
| 109 |
return conferencesData.filter((conf: Conference) => {
|
|
|
|
| 134 |
});
|
| 135 |
};
|
| 136 |
|
| 137 |
+
// Update getDatesWithEvents to use the same date parsing logic
|
| 138 |
const getDatesWithEvents = () => {
|
| 139 |
const dates = {
|
| 140 |
conferences: new Set<string>(),
|
|
|
|
| 142 |
};
|
| 143 |
|
| 144 |
conferencesData.forEach((conf: Conference) => {
|
| 145 |
+
// Handle deadline dates
|
| 146 |
+
if (conf.deadline && conf.deadline !== 'TBD') {
|
| 147 |
+
const deadlineDate = parseISO(conf.deadline);
|
| 148 |
+
if (isValid(deadlineDate)) {
|
| 149 |
+
dates.deadlines.add(format(deadlineDate, 'yyyy-MM-dd'));
|
| 150 |
+
}
|
| 151 |
}
|
| 152 |
+
|
| 153 |
+
// Handle conference dates
|
| 154 |
+
if (conf.date) {
|
| 155 |
+
const [startStr, endStr] = conf.date.split(/[-–]/);
|
| 156 |
+
const startMatch = startStr.trim().match(/([A-Za-z]+)\s+(\d+)/);
|
| 157 |
+
|
| 158 |
+
if (startMatch) {
|
| 159 |
+
const [_, month, startDay] = startMatch;
|
| 160 |
+
let year = conf.year?.toString() || '';
|
| 161 |
+
|
| 162 |
+
if (endStr) {
|
| 163 |
+
const endMatch = endStr.trim().match(/(\d+)?,?\s*(\d{4})/);
|
| 164 |
+
if (endMatch) {
|
| 165 |
+
year = endMatch[2];
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
if (year) {
|
| 170 |
+
const startDate = new Date(`${year}-${month}-${startDay.padStart(2, '0')}`);
|
| 171 |
+
|
| 172 |
+
if (isValid(startDate)) {
|
| 173 |
+
let currentDate = new Date(startDate);
|
| 174 |
+
|
| 175 |
+
// If there's an end date, mark all dates in between
|
| 176 |
+
if (endStr) {
|
| 177 |
+
const endMatch = endStr.trim().match(/(\d+)?,?\s*(\d{4})/);
|
| 178 |
+
if (endMatch) {
|
| 179 |
+
const endDay = endMatch[1];
|
| 180 |
+
const endDate = new Date(`${year}-${month}-${endDay.padStart(2, '0')}`);
|
| 181 |
+
|
| 182 |
+
while (currentDate <= endDate) {
|
| 183 |
+
dates.conferences.add(format(currentDate, 'yyyy-MM-dd'));
|
| 184 |
+
currentDate.setDate(currentDate.getDate() + 1);
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
} else {
|
| 188 |
+
// Single day conference
|
| 189 |
+
dates.conferences.add(format(currentDate, 'yyyy-MM-dd'));
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
}
|
|
|
|
|
|
|
| 194 |
}
|
| 195 |
});
|
| 196 |
|
|
|
|
| 203 |
const monthEvents = selectedDate ? getMonthEvents(selectedDate) : [];
|
| 204 |
const datesWithEvents = getDatesWithEvents();
|
| 205 |
|
| 206 |
+
// Render event details for a specific date
|
| 207 |
+
const renderEventDetails = (date: Date) => {
|
| 208 |
+
const events = getEventsForDate(date);
|
| 209 |
+
if (!events.length) return null;
|
| 210 |
+
|
| 211 |
+
return (
|
| 212 |
+
<div className="space-y-4">
|
| 213 |
+
<h3 className="font-semibold text-lg">
|
| 214 |
+
Events on {format(date, 'MMMM d, yyyy')}
|
| 215 |
+
</h3>
|
| 216 |
+
<div className="space-y-3">
|
| 217 |
+
{events.map((conf, index) => (
|
| 218 |
+
<div key={index} className="p-4 bg-white rounded-lg shadow-sm border border-neutral-200">
|
| 219 |
+
<h4 className="font-medium text-base">{conf.title}</h4>
|
| 220 |
+
{conf.full_name && (
|
| 221 |
+
<p className="text-sm text-neutral-600 mt-1">{conf.full_name}</p>
|
| 222 |
+
)}
|
| 223 |
+
<div className="mt-2 space-y-1 text-sm">
|
| 224 |
+
<p className="flex items-center gap-2">
|
| 225 |
+
<CalendarIcon className="h-4 w-4" />
|
| 226 |
+
{conf.date}
|
| 227 |
+
</p>
|
| 228 |
+
<p className="flex items-center gap-2">
|
| 229 |
+
<Globe className="h-4 w-4" />
|
| 230 |
+
{conf.place}
|
| 231 |
+
</p>
|
| 232 |
+
{conf.deadline && conf.deadline !== 'TBD' && (
|
| 233 |
+
<p className="flex items-center gap-2 text-red-600">
|
| 234 |
+
<Clock className="h-4 w-4" />
|
| 235 |
+
Deadline: {format(parseISO(conf.deadline), 'PPP')} ({conf.timezone})
|
| 236 |
+
</p>
|
| 237 |
+
)}
|
| 238 |
+
{conf.tags && (
|
| 239 |
+
<div className="flex items-center gap-2 mt-2 flex-wrap">
|
| 240 |
+
<Tag className="h-4 w-4" />
|
| 241 |
+
{Array.isArray(conf.tags) ? (
|
| 242 |
+
conf.tags.map((tag, i) => (
|
| 243 |
+
<span key={i} className="bg-neutral-100 px-2 py-1 rounded-full text-xs">
|
| 244 |
+
{tag}
|
| 245 |
+
</span>
|
| 246 |
+
))
|
| 247 |
+
) : (
|
| 248 |
+
<span className="bg-neutral-100 px-2 py-1 rounded-full text-xs">
|
| 249 |
+
{conf.tags}
|
| 250 |
+
</span>
|
| 251 |
+
)}
|
| 252 |
+
</div>
|
| 253 |
+
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
</div>
|
| 255 |
</div>
|
| 256 |
+
))}
|
| 257 |
</div>
|
| 258 |
+
</div>
|
| 259 |
+
);
|
| 260 |
+
};
|
| 261 |
|
| 262 |
+
return (
|
| 263 |
+
<div className="min-h-screen bg-neutral-light">
|
| 264 |
+
<Header onSearch={setSearchQuery} />
|
| 265 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
| 266 |
+
<div className="flex gap-8">
|
| 267 |
+
<div className="bg-white rounded-lg shadow p-6 flex-shrink-0">
|
| 268 |
+
<Calendar
|
| 269 |
+
mode="single"
|
| 270 |
+
selected={selectedDate}
|
| 271 |
+
onSelect={setSelectedDate}
|
| 272 |
+
onMonthChange={handleMonthChange}
|
| 273 |
+
modifiers={{
|
| 274 |
+
conference: (date) => datesWithEvents.conferences.some(d =>
|
| 275 |
+
format(d, 'yyyy-MM-dd') === format(date, 'yyyy-MM-dd')
|
| 276 |
+
),
|
| 277 |
+
deadline: (date) => datesWithEvents.deadlines.some(d =>
|
| 278 |
+
format(d, 'yyyy-MM-dd') === format(date, 'yyyy-MM-dd')
|
| 279 |
+
)
|
| 280 |
+
}}
|
| 281 |
+
className="bg-white rounded-lg shadow-sm mx-auto"
|
| 282 |
+
classNames={{
|
| 283 |
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
| 284 |
+
month: "space-y-4 w-full",
|
| 285 |
+
caption: "flex justify-center pt-1 relative items-center mb-4",
|
| 286 |
+
caption_label: "text-lg font-semibold",
|
| 287 |
+
table: "w-full border-collapse space-y-1",
|
| 288 |
+
head_row: "flex",
|
| 289 |
+
head_cell: "text-muted-foreground rounded-md w-14 font-normal text-[0.8rem]",
|
| 290 |
+
row: "flex w-full mt-2",
|
| 291 |
+
cell: "h-14 w-14 text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
| 292 |
+
day: "h-14 w-14 p-0 font-normal aria-selected:opacity-100 hover:bg-neutral-100 rounded-lg transition-colors",
|
| 293 |
+
day_today: "bg-neutral-100 text-primary font-semibold",
|
| 294 |
+
nav: "space-x-1 flex items-center",
|
| 295 |
+
nav_button: "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
| 296 |
+
nav_button_previous: "absolute left-1",
|
| 297 |
+
nav_button_next: "absolute right-1",
|
| 298 |
+
}}
|
| 299 |
+
modifiersStyles={{
|
| 300 |
+
conference: {
|
| 301 |
+
backgroundColor: '#DDD6FE',
|
| 302 |
+
color: '#7C3AED',
|
| 303 |
+
fontWeight: 'bold'
|
| 304 |
+
},
|
| 305 |
+
deadline: {
|
| 306 |
+
backgroundColor: '#FEE2E2',
|
| 307 |
+
color: '#EF4444',
|
| 308 |
+
fontWeight: 'bold'
|
| 309 |
+
}
|
| 310 |
+
}}
|
| 311 |
+
components={{
|
| 312 |
+
Day: (props) => (
|
| 313 |
+
<button
|
| 314 |
+
{...props}
|
| 315 |
+
onMouseEnter={() => setHoveredDate(props.date)}
|
| 316 |
+
onMouseLeave={() => setHoveredDate(undefined)}
|
| 317 |
+
/>
|
| 318 |
+
)
|
| 319 |
+
}}
|
| 320 |
+
/>
|
| 321 |
+
|
| 322 |
+
<div className="mt-4 space-y-2">
|
| 323 |
+
<div className="flex justify-center gap-6 mb-6">
|
| 324 |
+
<div className="flex items-center gap-2">
|
| 325 |
+
<CircleDot className="h-4 w-4 text-purple-600" />
|
| 326 |
+
<span>Conference Dates</span>
|
| 327 |
+
</div>
|
| 328 |
+
<div className="flex items-center gap-2">
|
| 329 |
+
<CircleDot className="h-4 w-4 text-red-500" />
|
| 330 |
+
<span>Submission Deadlines</span>
|
| 331 |
+
</div>
|
| 332 |
</div>
|
| 333 |
+
</div>
|
| 334 |
</div>
|
| 335 |
+
|
| 336 |
+
<div className="flex-grow">
|
| 337 |
+
{(hoveredDate || selectedDate) && renderEventDetails(hoveredDate || selectedDate)}
|
| 338 |
+
</div>
|
| 339 |
+
</div>
|
| 340 |
</div>
|
| 341 |
</div>
|
| 342 |
);
|