42 | {todos.length > 0 ? (
43 | todos.map((value, index, array) => (
44 |
45 | {value.formatedDueDate !== array[index - 1]?.formatedDueDate ? (
46 |
47 | {value.formatedDueDate}
48 |
49 | ) : null}
50 |
51 |
52 |
53 | ))
54 | ) : (
55 |
56 |

57 |
All done, you're awesome!
58 |
59 | Icon from{" "}
60 |
61 | Flaticon
62 |
63 |
64 |
65 | )}
66 |
67 | );
68 | }
69 |
70 | export default React.memo(Calendar);
71 |
--------------------------------------------------------------------------------
/src/NavigationMenu/index.tsx:
--------------------------------------------------------------------------------
1 | import { Collapse, List, ListItem, ListItemText, makeStyles } from "@material-ui/core";
2 | import ExpandLessIcon from "@material-ui/icons/ExpandLess";
3 | import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
4 | import React from "react";
5 | import { useSelector } from "react-redux";
6 | import { NavLink } from "react-router-dom";
7 |
8 | import { labelsSelectors } from "../redux/labels";
9 | import { todosSelectors } from "../redux/todos";
10 | import { routes } from "../routes";
11 |
12 | const useStyles = makeStyles((theme) => ({
13 | nested: {
14 | paddingLeft: theme.spacing(4),
15 | },
16 | linkActive: {
17 | background: theme.palette.action.selected,
18 | },
19 | }));
20 |
21 | function NavigationMenu() {
22 | const classes = useStyles();
23 | const [open, setOpen] = React.useState(true);
24 | const labels = useSelector(labelsSelectors.selectAll);
25 | const todos = useSelector(todosSelectors.selectAllIncomplete);
26 |
27 | return (
28 |