Skip to content

Commit

Permalink
terse local vars
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Nov 8, 2022
1 parent bc3d3d3 commit 2f5832d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/organisms/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ const TaskList = ({ newTask }: TaskListProps): JSX.Element => {
? (tasks ?? []).filter((t) => filters[t.status])
: tasks ?? [];

const { entries: newEntries, newTaskIndex: taskIndexUpdate } =
createListItems({
tasks: filtered,
newTask,
minDue: browser.getLastMidnight(),
});
const { entries: e, newTaskIndex: i } = createListItems({
tasks: filtered,
newTask,
minDue: browser.getLastMidnight(),
});

setEntries(newEntries);
setNewTaskIndex(taskIndexUpdate);
setEntries(e);
setNewTaskIndex(i);
}, [tasks, newTask, filters]);

useEffect(() => {
Expand Down

1 comment on commit 2f5832d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.