diff --git a/src/App.jsx b/src/App.jsx index 654da1ee5..74f163646 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -84,7 +84,9 @@ function App(props) { } const tasksNoun = taskList.length !== 1 ? "tasks" : "task"; - const headingText = `${taskList.length} ${tasksNoun} remaining`; + let headingText = `${taskList.length} ${tasksNoun}`; + if (filter === "Active") headingText += " remaining"; + if (filter === "Completed") headingText += " completed"; const listHeadingRef = useRef(null); const prevTaskLength = usePrevious(tasks.length);