-
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
add task solution #1518
base: master
Are you sure you want to change the base?
add task solution #1518
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.
Good job 👍
Let's make your code better
setError(ErrorMessage.noError); | ||
}, 3000); | ||
}) | ||
.finally(); |
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.
.finally(); |
.finally(); | ||
}, []); | ||
|
||
function deleteError() { |
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.
It is important to follow the same way of creating functions everywhere
function deleteError() { | |
const deleteError = () => { |
// interface UpdateTodo { | ||
// id: Todo['id']; | ||
// objectData: Todo; | ||
// } |
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
// interface UpdateTodo { | |
// id: Todo['id']; | |
// objectData: Todo; | |
// } |
}, [setIsInputLoading, posts]); | ||
const areAllCompleted = posts.every((todo: Todo) => todo.completed); |
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.
}, [setIsInputLoading, posts]); | |
const areAllCompleted = posts.every((todo: Todo) => todo.completed); | |
}, [setIsInputLoading, posts]); | |
const areAllCompleted = posts.every((todo: Todo) => todo.completed); |
} | ||
}; | ||
|
||
const saveInput = (evt: React.KeyboardEvent<HTMLInputElement>) => { |
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.
Use a more descriptive name for this function
|
||
<div | ||
data-cy="TodoLoader" | ||
className={`modal overlay ${todoTemplate?.id === post.id || deleteCheck ? 'is-active' : ''}`} |
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.
Use the classnames library for add classes with condition
DEMO LINK