diff --git a/src/App.tsx b/src/App.tsx index d46111e825..2b724c5dad 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ /* eslint-disable max-len */ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import 'bulma/css/bulma.css'; import '@fortawesome/fontawesome-free/css/all.css'; @@ -7,8 +7,20 @@ import { TodoList } from './components/TodoList'; import { TodoFilter } from './components/TodoFilter'; import { TodoModal } from './components/TodoModal'; import { Loader } from './components/Loader'; +import { Todo } from './types/Todo'; export const App: React.FC = () => { + const [isLoading, setIsLoading] = useState(true); + const [isModalVisible, setIsModalVisible] = useState(false); + const [todos, setTodos] = useState(null); + const [todo, setTodo] = useState(null); + + useEffect(() => { + setTimeout(() => { + setIsLoading(false); + }, 1000); + }, []); + return ( <>
@@ -17,18 +29,32 @@ export const App: React.FC = () => {

Todos:

- +
- - + {isLoading ? ( + + ) : ( + + )}
- + {isModalVisible && ( + + )} ); }; diff --git a/src/components/TodoFilter/TodoFilter.tsx b/src/components/TodoFilter/TodoFilter.tsx index 193f1cd2b2..e311d8094c 100644 --- a/src/components/TodoFilter/TodoFilter.tsx +++ b/src/components/TodoFilter/TodoFilter.tsx @@ -1,30 +1,78 @@ -export const TodoFilter = () => ( -
-

- - - -

- -

- - - - - - - {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */} -