-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Develop #2714
base: master
Are you sure you want to change the base?
Develop #2714
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.
Great job on implementing the task! 🎉 While there are a few minor issues like typos in variable names and a condition that needs tweaking, they don't significantly impact the functionality. Keep up the good work and consider addressing these minor points for even cleaner code in the future! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/components/NewMovie/NewMovie.tsx
Outdated
const handleImdbUId = (val: string) => { | ||
setImdbId(val); | ||
}; |
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 is a typo in the function name handleImdbUId
. It should be handleImdbId
to maintain consistency with the state variable imdbId
.
src/components/NewMovie/NewMovie.tsx
Outdated
const trimedTitle = title.trim(); | ||
const trimedDescription = description.trim(); | ||
const trimedImgUrl = imgUrl.trim(); |
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 are typos in the variable names trimedTitle
, trimedDescription
, and trimedImgUrl
. They should be trimmedTitle
, trimmedDescription
, and trimmedImgUrl
respectively to maintain consistency and correct spelling.
src/components/NewMovie/NewMovie.tsx
Outdated
if (trimedTitle || trimedImgUrl || trimmedImdbUrl || trimmedImdbId) { | ||
onAdd(newMovie); | ||
} |
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 condition in the if
statement should ensure that all required fields are filled before adding a new movie. Currently, it checks if any of the fields are filled. Consider changing the condition to check if all required fields are non-empty.
DEMO LINK