Skip to content

Commit b7d2768

Browse files
committed
Set state for showing the error message / passed as props
1 parent 6f57740 commit b7d2768

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const App: FC = () => {
1111
const [toDoPosition, setToDoPosition] = useState<string>('all');
1212
const [toDoFilter, setToDoFilter] = useState<string[]>([]);
1313
const [hasError, setHasError] = useState(false);
14+
const [showError, setShowError] = useState(false);
1415

1516
const ToDoFilterHandler = function (): void {
1617

@@ -38,7 +39,7 @@ const App: FC = () => {
3839
<h3 style={{ fontSize: '2.5rem', fontFamily: 'Gloria Hallelujah', color: '#F7F9F9',}}>Your To Do List</h3>
3940
</header>
4041

41-
<AddTaskForm setToDoInput = {setToDoInput} todos = {todos} setTodos = {setTodos} toDoInput = {toDoInput} toDoPosition = {toDoPosition} setToDoPosition = {setToDoPosition} hasError = {hasError} setHasError = {setHasError} />
42+
<AddTaskForm setToDoInput = {setToDoInput} todos = {todos} setTodos = {setTodos} toDoInput = {toDoInput} toDoPosition = {toDoPosition} setToDoPosition = {setToDoPosition} hasError = {hasError} setHasError = {setHasError} showError = {showError} setShowError = {setShowError} />
4243
<ToDoList todos = {todos} setTodos = {setTodos} />
4344

4445
</div>

0 commit comments

Comments
 (0)