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 #2701

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

solution #2701

wants to merge 1 commit into from

Conversation

so3r
Copy link

@so3r so3r commented Dec 18, 2024

Copy link

@maxsabo maxsabo left a comment

Choose a reason for hiding this comment

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

good job!

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 task requirements! 🎉 The code is mostly well-structured and functional. Just a small suggestion: consider validating the event.target.value before casting it to the Filters enum to prevent potential runtime errors. 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! ✨

<TodoFilter
query={query}
setQuery={setQuery}
status={status}

Choose a reason for hiding this comment

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

Ensure that the value from event.target.value is a valid Filters enum before setting the state. This can prevent potential runtime errors if the value is not one of the expected enum values.

<select
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.

Casting event.target.value directly to Filters can lead to runtime errors if the value is not a valid Filters enum. Consider validating the value or using a type-safe approach to ensure it matches one of the enum values.

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