changement nom variable
This commit is contained in:
1 parent
353807a37e
commit
32e26ea9c9
1 file changed
+5
-5
@@ -24,12 +24,12 @@ Calendar() {
|
|||||||
|
|
||||||
const eventsByDate = useMemo(() => {
|
const eventsByDate = useMemo(() => {
|
||||||
if (!user?.tasks) return {};
|
if (!user?.tasks) return {};
|
||||||
return user.tasks.reduce((acc, task) => {
|
return user.tasks.reduce((eventsByDate, task) => {
|
||||||
if (!task?.start) return acc;
|
if (!task?.start) return eventsByDate;
|
||||||
const dateKey = task.start.split(" ")[0];
|
const dateKey = task.start.split(" ")[0];
|
||||||
if (!acc[dateKey]) acc[dateKey] = [];
|
if (!eventsByDate[dateKey]) eventsByDate[dateKey] = [];
|
||||||
acc[dateKey].push(task);
|
eventsByDate[dateKey].push(task);
|
||||||
return acc;
|
return eventsByDate;
|
||||||
}, {});
|
}, {});
|
||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user