Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

andrushchenkoo
Copy link

Copy link

@LiliiaVol LiliiaVol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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! ✨

Comment on lines +70 to +71
todo={selectedTodo}
onCloseTodo={todo => setSelectedTodo(todo)}

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);

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants