import React, { useEffect } from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; import { useDispatch } from "react-redux"; import { actions, useTypedSelector } from "./store"; import { Link } from "react-router-dom"; import humanizeDuration from "humanize-duration"; import type { Task, Habit } from "./store"; const days = [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", ]; const postItColor = "yellow"; const PostIt = (props: { day: number; tasks: Task[] }) => (