-
Notifications
You must be signed in to change notification settings - Fork 2.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
Solution #2703
base: master
Are you sure you want to change the base?
Solution #2703
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 work!
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 job on implementing the main functionality of the application! 🎉 The structure and use of React components are well done. There are a couple of minor issues to address: ensure the setStatus
function receives the correct type by converting the string to the Filters
enum, and revise the onCloseTodo
prop to properly close the modal. Keep up the good work and happy coding! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
todo={selectedTodo} | ||
onCloseTodo={todo => setSelectedTodo(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.
The onCloseTodo
prop is expected to be a function that closes the modal. However, the current implementation passes a function that sets the selected todo, which might not be the intended behavior. Consider revising this function to properly handle the closing of the modal.
data-cy="statusSelect" | ||
value={status} | ||
onChange={event => { | ||
setStatus(event.target.value as Filters); |
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.
The setStatus
function is being passed event.target.value
directly, which is of type string
. Since setStatus
expects a value of type Filters
, you should ensure that the value is properly cast or converted to the Filters
type. Consider using a type assertion or a mapping function to convert the string to the appropriate Filters
enum value.
DEMO LINK