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

Develop #1579

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

Develop #1579

wants to merge 5 commits into from

Conversation

Andrew77788
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

  1. It is bad practice to write all logic in one component, you need to separate the logic into different components, for example Header, Footer, TodoItem, TodoList

  2. The edit mode looks strange, you need to fix styles

image
  1. Empty todo should be deleted
image

src/App.tsx Outdated
setChangeTodoId(todoItem.id);
};

const ClearCompleted = () => {

Choose a reason for hiding this comment

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

Suggested change
const ClearCompleted = () => {
const clearCompleted = () => {

Copy link
Author

Choose a reason for hiding this comment

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

The edit mode looks strange, you need to fix styles - не знаю як це зробити, підскажіть будь-ласка, витратив купу часу і так і не зрозумів, чому стилі не спрацьовують

src/App.tsx Outdated
<header className="todoapp__header">
<button
type="button"
// className="todoapp__toggle-all active"

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
// className="todoapp__toggle-all active"

src/App.tsx Outdated
<button
type="button"
// className="todoapp__toggle-all active"
className={`todoapp__toggle-all ${allCompleted ? 'active' : ''}`}

Choose a reason for hiding this comment

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

Use the classnames library for add classes with condition, fix it everywhere

Copy link

@anastasiiavorobiova anastasiiavorobiova 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!

  • Check styles here
  • A user shouldn't be able to delete the todo in the edit mode by clicking on the cross icon
Screenshot 2025-01-04 at 14 43 15

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