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

solution #1173

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

solution #1173

wants to merge 3 commits into from

Conversation

manch0ffline
Copy link

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.

Good job 👍
Let's improve your code
The comment cannot be only spaces
image

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.

Good job 👍
Let's make your code better

src/App.tsx Outdated
Comment on lines 50 to 52
.then(usersFromServer => {
setUsers(usersFromServer);
})

Choose a reason for hiding this comment

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

Suggested change
.then(usersFromServer => {
setUsers(usersFromServer);
})
.then(setUsers)

src/App.tsx Outdated
});
}, [selectedUser]);

//geting COMENTS

Choose a reason for hiding this comment

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

Remove all comments

Suggested change
//geting COMENTS

src/App.tsx Outdated
Comment on lines 95 to 97
.then(cmnt => {
setComents(cmnt);
})

Choose a reason for hiding this comment

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

Suggested change
.then(cmnt => {
setComents(cmnt);
})
.then(setComents)

src/App.tsx Outdated

<Loader />
const [selectedPostId, setSelectedPostId] = useState<number>(0);
const [coments, setComents] = useState<Comment[]>([]);

Choose a reason for hiding this comment

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

Suggested change
const [coments, setComents] = useState<Comment[]>([]);
const [comments, setComments] = useState<Comment[]>([]);

src/api/user.ts Outdated
Comment on lines 8 to 19
// export const createTodo = ({ name, email, phone }: Omit<User, 'id'>) => {
// return client.post<User>(`/todos`, { name, email, phone });
// };

// export const deleteTodo = (todoId: number) => {
// return client.delete(`/todos/${todoId}`);
// };

// export const updateTodo = ({ id, title, completed, userId }: User) => {
// return client.patch<User>(`/todos/${id}`, { title, completed, userId });
// };
// Add more methods here

Choose a reason for hiding this comment

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

Remove all comments

>
<div className="message-header">
<a href={`mailto:${coment.email}`} data-cy="CommentAuthor">
{coment.name}

Choose a reason for hiding this comment

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

Use destructuring for coment

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.

2 participants