Rename processed events to row events

This commit is contained in:
Vencislav Atanasov 2024-10-01 01:51:33 +03:00
parent 300ea1c4e7
commit eec6c8d9f5
1 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ export default function useScheduleTable({
const nextDate = !isLast ? slotsArray[slotsIndex + 1] : null;
const isFirstForTheDay = slotsIndex > 0 && !isSameDay(date, slotsArray[slotsIndex - 1]);
const isLastForTheDay = slotsArray?.[slotsIndex + 1] && !isSameDay(date, slotsArray[slotsIndex + 1]);
const processedEvents = new Set();
const rowEvents = new Set();
const eventCells = filteredHalls.flatMap((hall, hallIndex, hallsArray) => {
const currentTimeSlots = filteredSlots.filter(slot => compareAsc(slot.starts_at, date) === 0);
@ -46,7 +46,7 @@ export default function useScheduleTable({
}];
}
if (processedEvents.has(currentHallSlot.event_id)) {
if (rowEvents.has(currentHallSlot.event_id)) {
return [];
}
@ -67,7 +67,7 @@ export default function useScheduleTable({
break;
}
processedEvents.add(currentHallSlot.event_id);
rowEvents.add(currentHallSlot.event_id);
colSpan++;
}