-
Notifications
You must be signed in to change notification settings - Fork 36
Устинов Александр, M3335 #27
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
base: master
Are you sure you want to change the base?
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://task-5-git-fork-alexust27-master.itmo-yandex.now.sh |
| export class SearchInput extends React.Component { | ||
| render() { | ||
| return ( | ||
| <form method="post" className="header__search"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется POST сейчас приложением не обрабатывается
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
исправил
| id={action.act} | ||
| className="main-block__ref-func" | ||
| onClick={() => { | ||
| if (action.act === 'get-letter' && !this.props.isLetterOpened) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поставить несколько кнопок с разными обработчиками и код бы стал сразу немного проще
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
исправил
| onCheckboxChange(id) { | ||
| const newCheckedLetters = this.state.checkedLetters; | ||
| this.setState(() => { | ||
| newCheckedLetters[id] = !newCheckedLetters[id]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Создание нового куска стейта нужно делать без модификации предыдущего
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
исправил
|
|
||
| newMail() { | ||
| counter++; | ||
| const id = counter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Генератор письма со всеми параметрами можно вынести в отдельный модуль и сущность для лучшей читаемости
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вынес функцию генерации письма в generator.js
|
@underoot я поправил, посмотри, пожалуйста |
No description provided.