-
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
Done #1572
base: master
Are you sure you want to change the base?
Done #1572
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.
README.md
Outdated
@@ -47,4 +47,4 @@ Implement the ability to edit a todo title on double click: | |||
|
|||
- Implement a solution following the [React task guideline](https://github.com/mate-academy/react_task-guideline#react-tasks-guideline). | |||
- Use the [React TypeScript cheat sheet](https://mate-academy.github.io/fe-program/js/extra/react-typescript). | |||
- Replace `<your_account>` with your Github username in the [DEMO LINK](https://<your_account>.github.io/react_todo-app-with-api/) and add it to the PR description. | |||
- Replace `<your_account>` with your Github username in the [DEMO LINK](https:/IrynaMariiko00.github.io/react_todo-app-with-api/) and add it to the PR description. |
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.
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.
don't forget to add loaders on clear completed or toggle all click
src/App.tsx
Outdated
useEffect(() => { | ||
const allCompleted = todos.every(todo => todo.completed); | ||
|
||
setIsToggleAllActive(allCompleted); | ||
}, [todos]); |
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.
useEffect(() => { | |
const allCompleted = todos.every(todo => todo.completed); | |
setIsToggleAllActive(allCompleted); | |
}, [todos]); | |
const isToggleAllActive = todos.every(todo => todo.completed); |
just can be a var
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.
Looks good.
DEMO LINK