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

react_add-todo-form solution #2161

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

Conversation

Medaed
Copy link

@Medaed Medaed commented Nov 6, 2023

Copy link

@loralevitska loralevitska left a comment

Choose a reason for hiding this comment

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

Almost done) Try to pass all tests
image

src/App.tsx Outdated
</option>
{usersFromServer.map(user => (
<option
value={user.id}

Choose a reason for hiding this comment

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

Destructure user

Comment on lines 29 to 31
{user && (

<UserInfo user={user} />

Choose a reason for hiding this comment

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

Suggested change
{user && (
<UserInfo user={user} />
{user && (
<UserInfo user={user} />

Choose a reason for hiding this comment

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

image still not fixed


export const TodoList: React.FC<Props> = ({ todos }) => {
return (
<section className="TodoList">

Choose a reason for hiding this comment

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

Use semantic tags for list ul li. Don't forget to remove default li dots and ul paddings

@Medaed Medaed requested a review from loralevitska November 6, 2023 23:13
src/App.tsx Outdated
title,
completed: false,
userId,
user: usersFromServer.find(user => user.id === userId),

Choose a reason for hiding this comment

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

looks like you can use here getUserById function

src/App.tsx Outdated
Comment on lines 109 to 113
{usersFromServer.map(({ id, name }) => (
<option
value={id}
key={name}
>

Choose a reason for hiding this comment

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

do not forget about key prop

Comment on lines 29 to 31
{user && (

<UserInfo user={user} />

Choose a reason for hiding this comment

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

image still not fixed

@Medaed Medaed requested a review from etojeDenys November 7, 2023 10:12
Copy link

@IvanFesenko IvanFesenko left a comment

Choose a reason for hiding this comment

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

Well done

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.

4 participants