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

add task solution 👌🍑 #1884

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

denys2
Copy link

@denys2 denys2 commented Oct 6, 2023

Comment on lines 17 to 20
const isDisabled = title.length === 0
|| imgUrl.length === 0
|| imdbUrl.length === 0
|| imdbId.length === 0;
Copy link

Choose a reason for hiding this comment

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

image
use also trim here for disabling, because now i can unblock button with just 'spaces'

Suggested change
const isDisabled = title.length === 0
|| imgUrl.length === 0
|| imdbUrl.length === 0
|| imdbId.length === 0;
const isDisabled = !title.length
|| !imgUrl.length
|| !imdbUrl.length
|| !imdbId.length;

Comment on lines 33 to 37
if (newMovie.title.length === 0
|| newMovie.imgUrl.length === 0
|| newMovie.imdbUrl.length === 0
|| newMovie.imdbId.length === 0
) {
Copy link

Choose a reason for hiding this comment

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

Suggested change
if (newMovie.title.length === 0
|| newMovie.imgUrl.length === 0
|| newMovie.imdbUrl.length === 0
|| newMovie.imdbId.length === 0
) {
if (!newMovie.title.length
|| !newMovie.imgUrl.length
|| !newMovie.imdbUrl.length
|| !newMovie.imdbId.length
) {

Copy link
Author

Choose a reason for hiding this comment

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

hi! if you don't mind I added "trim()"

@denys2 denys2 requested a review from sTorba24 October 11, 2023 17:10
Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Great work 🔥

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