Skip to content

Conversation

@alexust27
Copy link

No description provided.

@vercel
Copy link

vercel bot commented May 11, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

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">

Choose a reason for hiding this comment

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

Кажется POST сейчас приложением не обрабатывается

Copy link
Author

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)

Choose a reason for hiding this comment

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

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

Copy link
Author

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];

Choose a reason for hiding this comment

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

Создание нового куска стейта нужно делать без модификации предыдущего

Copy link
Author

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;

Choose a reason for hiding this comment

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

Генератор письма со всеми параметрами можно вынести в отдельный модуль и сущность для лучшей читаемости

Copy link
Author

@alexust27 alexust27 May 20, 2019

Choose a reason for hiding this comment

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

Вынес функцию генерации письма в generator.js

@alexust27
Copy link
Author

@underoot я поправил, посмотри, пожалуйста

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