Skip to content

Commit

Permalink
Remove unnecessary return statements
Browse files Browse the repository at this point in the history
  • Loading branch information
GAsplund committed Jan 5, 2024
1 parent 5959db6 commit 2a40cd9
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions frontend/src/use-cases/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,22 @@ const Home = () => {
return [
...events
.filter(e => overlap(e.room, filters))
.map(e => {
return {
...e,
className: getClassName(e.room.sort()),
start: new Date(Number(e.start)),
end: new Date(Number(e.end)),
editable: user.groups.includes(e.booked_as) || user.is_admin,
durationEditable: false,
room: e.room.sort(),
};
}),
...illegalSlots.map(e => {
return {
backgroundColor: "#EF9A9A",
.map(e => ({
...e,
className: getClassName(e.room.sort()),
start: new Date(Number(e.start)),
end: new Date(Number(e.end)),
display: "background",
title: e.title + (e.description ? ` - ` + e.description : ""),
};
}),
editable: user.groups.includes(e.booked_as) || user.is_admin,
durationEditable: false,
room: e.room.sort(),
})),
...illegalSlots.map(e => ({
backgroundColor: "#EF9A9A",
start: new Date(Number(e.start)),
end: new Date(Number(e.end)),
display: "background",
title: e.title + (e.description ? ` - ` + e.description : ""),
})),
{
backgroundColor: "#AAAAAA",
startRecur: new Date(new Date(Date.now() + 5443200000).toDateString()),
Expand Down

0 comments on commit 2a40cd9

Please sign in to comment.