From 2f5832df8f699e550648a6a8ee3e43f5a4cebdae Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Tue, 8 Nov 2022 16:48:01 -0500 Subject: [PATCH] terse local vars --- src/components/organisms/TaskList.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/organisms/TaskList.tsx b/src/components/organisms/TaskList.tsx index d68b5931..98f19ec8 100644 --- a/src/components/organisms/TaskList.tsx +++ b/src/components/organisms/TaskList.tsx @@ -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(() => {