Commit c9b28cbf authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

[tag]staging

parents 64932ed6 a14ace56
Pipeline #50598 failed with stages
in 9 seconds
......@@ -19,11 +19,9 @@ export default function EventCalendar() {
const [currentMonth, setCurrentMonth] = useState(new Date());
const today = new Date();
// Fetch event data from API
const { data } = useGetEvents<EventApiResponse>();
const events = data?.responseData.rows ?? [];
// Calculate the days to display in the current month grid
const days = useMemo(() => {
const start = startOfMonth(currentMonth);
const end = endOfMonth(currentMonth);
......@@ -40,7 +38,6 @@ export default function EventCalendar() {
return result;
}, [currentMonth]);
// Helper: get all events for a specific day
const getEventForDay = (date: Date) =>
events.filter((e) => isSameDay(new Date(e.start_time), date));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment