-
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
add task solution #2745
base: master
Are you sure you want to change the base?
add task solution #2745
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 requirements! 🎉 The core functionality is well-handled, and the form logic is correctly set up. While there are minor suggestions for improving the onChange
handlers and ensuring the TextField
component handles the error
prop correctly, these do not impact the overall functionality. Keep up the good work and consider these improvements for future projects! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/components/NewMovie/NewMovie.tsx
Outdated
value="" | ||
onChange={() => {}} | ||
value={inputState.title} | ||
onChange={e => setInputState({ ...inputState, title: e })} |
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 onChange
handler should extract the value from the event object. It should be onChange={e => setInputState({ ...inputState, title: e.target.value })}
.
src/components/NewMovie/NewMovie.tsx
Outdated
name="description" | ||
label="Description" | ||
value={description} | ||
onChange={e => setDescription(e)} |
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 onChange
handler should extract the value from the event object. It should be onChange={e => setDescription(e.target.value)}
.
src/components/NewMovie/NewMovie.tsx
Outdated
name="imgUrl" | ||
label="Image URL" | ||
value={inputState.imgUrl} | ||
onChange={e => setInputState({ ...inputState, imgUrl: e })} |
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 onChange
handler should extract the value from the event object. It should be onChange={e => setInputState({ ...inputState, imgUrl: e.target.value })}
.
src/components/NewMovie/NewMovie.tsx
Outdated
name="imdbUrl" | ||
label="Imdb URL" | ||
value={inputState.imdbUrl} | ||
onChange={e => setInputState({ ...inputState, imdbUrl: e })} |
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 onChange
handler should extract the value from the event object. It should be onChange={e => setInputState({ ...inputState, imdbUrl: e.target.value })}
.
src/components/NewMovie/NewMovie.tsx
Outdated
name="imdbId" | ||
label="Imdb ID" | ||
value={inputState.imdbId} | ||
onChange={e => setInputState({ ...inputState, imdbId: e })} |
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 onChange
handler should extract the value from the event object. It should be onChange={e => setInputState({ ...inputState, imdbId: e.target.value })}
.
value={inputState.imdbId} | ||
onChange={e => setInputState({ ...inputState, imdbId: e })} | ||
onBlur={() => setBlurredFields({ ...blurredFields, imdbId: true })} | ||
error={imdbIdError} |
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.
Ensure that the TextField
component can handle the error
prop correctly. If it expects a boolean, this is fine, but if it expects a string or a different type, adjustments may be needed.
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.
Hi, you need to fix all comments by AI
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 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.
Looks good
DEMO LINK