Skip to content

Ts react todo list hw#6#51

Open
Kateryna-Borysenko wants to merge 35 commits into
xzfantom:mainfrom
Kateryna-Borysenko:ts-react-todo-list_hw#6
Open

Ts react todo list hw#6#51
Kateryna-Borysenko wants to merge 35 commits into
xzfantom:mainfrom
Kateryna-Borysenko:ts-react-todo-list_hw#6

Conversation

@Kateryna-Borysenko
Copy link
Copy Markdown

No description provided.

Comment thread src/components/App/App.tsx Outdated
const App: React.FC = () => {
return (
<>
<Header name={undefined} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

почему явно сюда прокидываем undefined. если компонент используется где то еще, то name задаем дефолтное значение внутри компонента

Comment thread src/components/App/App.tsx Outdated
<Route path='/todos'>
<HomePage />
</Route>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

лишние пустые строки

Comment thread src/components/TodoItem/TodoItem.jsx Outdated
// )
// }

// export default TodoItem
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

комментированный код удаляться должен

Comment thread src/components/UserMenu/UserMenu.tsx Outdated
return (
<div className={s.wrap}>
<span className={s.todos}>
Active:{' '}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

лучше задачать на этом уровне в s.numberTodos стиль маржин лефт если надо пробел

Comment thread src/index.css Outdated
margin-top: 0;
margin-bottom: 0;
list-style: none;
} */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

комменты такие удаляются

Comment thread src/components/Header/Header.tsx Outdated
import UserMenu from '../UserMenu/UserMenu'
import { connect } from 'react-redux'

const Header = (props: { name: any }) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

any тип не приемлим. по дефолту пустая строка

Comment thread src/components/Header/Header.tsx Outdated
<Navigation name={''} />
{!props.name ? (
<Link to='/login'>
<BigButton text='Log In' icon={''} disabled={false} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

дефолтное значение прокинуть в компонент, тут не вызывать, делаем его не обязательным если это используется где то еще

Comment thread src/components/Header/Header.tsx Outdated
<img className={s.logo} src={logo} alt='logo' />
<div className={s.logoName}>Todo List</div>
</div>
<Navigation name={''} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

дефолтное значение прокинуть в компонент, тут не вызывать, делаем его не обязательным если это используется где то еще

Comment thread src/components/Header/Header.tsx Outdated
<BigButton text='Log In' icon={''} disabled={false} />
</Link>
) : (
<UserMenu name={''} todos={[]} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

дефолтное значение прокинуть в компонент, тут не вызывать, делаем его не обязательным если это используется где то еще

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