Tasks: removes unnecessary comments
parent
8ba7709653
commit
f3ba0b30ef
|
@ -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<string, number>();
|
||||
tasks.forEach((task) => task.tags.forEach((tag) => {
|
||||
tags.set(tag, (tags.get(tag) ?? 0) + 1);
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue