From f3ba0b30efa9e757efd0bca78e5b0c4bfa5d78ba Mon Sep 17 00:00:00 2001 From: Andrew P Maney Date: Wed, 18 Mar 2020 11:16:05 -0700 Subject: [PATCH] Tasks: removes unnecessary comments --- src/components/Tasks/Sidebar.tsx | 2 -- src/components/Tasks/TaskList.tsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/components/Tasks/Sidebar.tsx b/src/components/Tasks/Sidebar.tsx index 5af5f2b..3477a75 100644 --- a/src/components/Tasks/Sidebar.tsx +++ b/src/components/Tasks/Sidebar.tsx @@ -45,10 +45,8 @@ function SidebarListItem(props: ListItemPropsType) { export default function Sidebar(props: { tasks: TaskType[] }) { const { tasks } = props; - // TODO: memoize const amountDueToday = tasks.filter((x) => x.dueDate && moment(x.dueDate.toJSDate()).isSame(moment(), 'day')).length; - // TODO: memoize const tags = new Map(); tasks.forEach((task) => task.tags.forEach((tag) => { tags.set(tag, (tags.get(tag) ?? 0) + 1); diff --git a/src/components/Tasks/TaskList.tsx b/src/components/Tasks/TaskList.tsx index 9269f61..3c302f6 100644 --- a/src/components/Tasks/TaskList.tsx +++ b/src/components/Tasks/TaskList.tsx @@ -47,7 +47,6 @@ export default React.memo(function TaskList(props: PropsType) { const potentialEntries = props.entries.filter((x) => showCompleted || !x.finished); let entries; - // filter const tagPrefix = 'tag:'; if (filterBy?.startsWith(tagPrefix)) { const tag = filterBy.slice(tagPrefix.length); @@ -58,7 +57,6 @@ export default React.memo(function TaskList(props: PropsType) { entries = potentialEntries; } - // sort const sortedEntries = sortSelector(entries); const itemList = sortedEntries.map((entry) => {