diff --git a/src/components/Store.tsx b/src/components/Store.tsx index 75b99611e..db85b2446 100644 --- a/src/components/Store.tsx +++ b/src/components/Store.tsx @@ -1,13 +1,12 @@ import { useEffect, useReducer } from 'react'; import { Filter } from '../types/Filter'; import { Todo } from '../types/Todo'; -import { TodoStatus } from '../types/TodoStatus'; import React from 'react'; type State = { todos: Todo[]; newTodoTitle: string; - status: TodoStatus; + status: Filter; filter: Filter; }; @@ -22,7 +21,7 @@ const initialTodos: Todo[] = getTodosFromLocaleStorage(); const initialState: State = { todos: initialTodos, newTodoTitle: '', - status: TodoStatus.all, + status: Filter.All, filter: Filter.All, }; @@ -32,7 +31,7 @@ type Action = | { type: 'updateTodo'; payload: Todo } | { type: 'setNewTodoTitle'; payload: string } | { type: 'setAllCompleted'; payload: boolean } - | { type: 'setStatus'; payload: TodoStatus } + | { type: 'setStatus'; payload: Filter } | { type: 'setNewStatus'; payload: Todo } | { type: 'setFilterByStatus'; payload: Filter } | { type: 'clearAllCompleted' }; diff --git a/src/index.tsx b/src/index.tsx index 0be17fefc..4ecbf4d8d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,5 @@ import { createRoot } from 'react-dom/client'; - import './styles/index.scss'; -// import './styles/todo.scss'; -// import './styles/todoapp.scss'; -// import './styles/filter.scss'; - import { App } from './App'; import React from 'react'; import { GlobalStateProvider } from './components/Store'; diff --git a/src/types/TodoStatus.ts b/src/types/TodoStatus.ts deleted file mode 100644 index bc1b08497..000000000 --- a/src/types/TodoStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum TodoStatus { - all = 'All', - active = 'Active', - completed = 'Completed', -}