Commit faf0c845 authored by Gijs Hendriksen's avatar Gijs Hendriksen Committed by Wietse Kuipers
Browse files

Fixed the events that are loaded on the welcome screen.

Before this fix, the welcome screen was only able to show one event per day instead of all events on that day.
Furthermore, after gathering the events for a certain day, the first event for the next day was skipped and not included in the welcome screen.
parent 1587949f
......@@ -32,12 +32,13 @@ const eventListToSections = (eventList) => {
eventIndex += 1;
const list = [];
let next = first;
while (Moment(first.start).isSame(next.start) && eventIndex < eventList.length) {
while (Moment(first.start).isSame(next.start, 'day') && eventIndex < eventList.length) {
list.push(next);
next = eventList[eventIndex];
eventIndex += 1;
}
eventLists.push(list);
eventIndex -= 1;
}
return eventLists.map(list => ({
......
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