-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #1500
base: master
Are you sure you want to change the base?
Develop #1500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments
src/components/Footer/Footer.tsx
Outdated
setError, | ||
setIsLoadingIds, | ||
}) => { | ||
const [activeFilter, setActiveFilter] = useState<string>(FilterType.All); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [activeFilter, setActiveFilter] = useState<string>(FilterType.All); | |
const [activeFilter, setActiveFilter] = useState<FilterType>(FilterType.All); |
src/components/Footer/Footer.tsx
Outdated
setError, | ||
setIsLoadingIds, | ||
}) => { | ||
const [activeFilter, setActiveFilter] = useState<string>(FilterType.All); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this state here? looks redundant, just pass to the footer the currentFilter
src/components/TodoItem/TodoItem.tsx
Outdated
// function toggleCompletedTodo() { | ||
// setIsLoadingIds(currentIds => [...currentIds, todo.id]); | ||
|
||
// const updatedTodo = { ...todo, completed: !todo.completed }; | ||
|
||
// updateTodo(updatedTodo) | ||
// .then(updatedTodoFromServer => { | ||
// setTodos(currentToDos => | ||
// currentToDos.map(item => | ||
// item.id === updatedTodoFromServer.id ? updatedTodoFromServer : item, | ||
// ), | ||
// ); | ||
// }) | ||
// .catch(() => { | ||
// setError('Unable to update a todo'); | ||
// }) | ||
// .finally(() => { | ||
// setIsLoadingIds(currentIds => currentIds.filter(id => id !== todo.id)); | ||
// }); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
DEMO LINK