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 #1518

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

Conversation

vasylynaBC
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 make your code better

setError(ErrorMessage.noError);
}, 3000);
})
.finally();

Choose a reason for hiding this comment

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

Suggested change
.finally();

.finally();
}, []);

function deleteError() {

Choose a reason for hiding this comment

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

It is important to follow the same way of creating functions everywhere

Suggested change
function deleteError() {
const deleteError = () => {

Comment on lines +6 to +9
// interface UpdateTodo {
// id: Todo['id'];
// objectData: Todo;
// }

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
// interface UpdateTodo {
// id: Todo['id'];
// objectData: Todo;
// }

Comment on lines +35 to +36
}, [setIsInputLoading, posts]);
const areAllCompleted = posts.every((todo: Todo) => todo.completed);

Choose a reason for hiding this comment

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

Suggested change
}, [setIsInputLoading, posts]);
const areAllCompleted = posts.every((todo: Todo) => todo.completed);
}, [setIsInputLoading, posts]);
const areAllCompleted = posts.every((todo: Todo) => todo.completed);

}
};

const saveInput = (evt: React.KeyboardEvent<HTMLInputElement>) => {

Choose a reason for hiding this comment

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

Use a more descriptive name for this function


<div
data-cy="TodoLoader"
className={`modal overlay ${todoTemplate?.id === post.id || deleteCheck ? 'is-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

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