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

task solution #2124

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

task solution #2124

wants to merge 1 commit into from

Conversation

dolphinnq
Copy link

Copy link

@dsfreedom dsfreedom 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. You only need to add labels)

Copy link

@polosanya polosanya 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! I'm approving it, but please pay attention to the comments)

Comment on lines +16 to +17
const [titleError, setTitleError] = useState(false);
const [titlePatternError, setTitlePatternError] = useState(false);

Choose a reason for hiding this comment

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

image

}

const newPost = {
id: (Math.max(...posts.map(todo => todo.id)) + 1),

Choose a reason for hiding this comment

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

Would be great to create a variable\function for that value

title,
completed: false,
userId: selectedUserId,
user: usersFromServer.find(user => user.id === selectedUserId) || null,

Choose a reason for hiding this comment

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

Same here

Comment on lines +112 to +114
{titlePatternError && (
<span className="error">
Only ua and en letters, digits, and spaces are allowed

Choose a reason for hiding this comment

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

You could save the error text in the state and use here instead of the boolean 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