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

Todo app with api #766

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

Todo app with api #766

wants to merge 4 commits into from

Conversation

dimkamg21
Copy link

src/index.tsx Outdated

createRoot(document.getElementById('root') as HTMLDivElement)
.render(<App />);
.render(USER_ID ? <App /> : <UserWarning />);

Choose a reason for hiding this comment

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

better to add some condition in App component and not touch the index.ts file

import { TodoItem } from '../TodoItem/TodoItem';
import { Todo } from '../../types/Todo';
import { TempoTodoItem } from '../TempoTodoItem/TempoTodoItem';
// import { useState } from 'react';

Choose a reason for hiding this comment

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

remove all comments

src/App.tsx Outdated
Comment on lines 291 to 293
className={errorMessage
? 'notification is-danger is-light has-text-weight-normal'
: 'notification is-danger is-light has-text-weight-normal hidden'}

Choose a reason for hiding this comment

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

better to use classNames package for such cases

src/App.tsx Outdated
className={classNames('todoapp__clear-completed', {
'todoapp__clear-completed--hidden': completedTodosCount === 0,
})}
onClick={() => handleClearCompletedTodos()}

Choose a reason for hiding this comment

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

Suggested change
onClick={() => handleClearCompletedTodos()}
onClick={handleClearCompletedTodos}

we can simplify it

Copy link

@VitaliyBondarenko1982 VitaliyBondarenko1982 left a comment

Choose a reason for hiding this comment

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

Looks good

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