-
Notifications
You must be signed in to change notification settings - Fork 1
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
Большие перемены (часть 1) #6
Большие перемены (часть 1) #6
Conversation
Ваш пулреквест опубликован. Посмотреть можно здесь |
…м дата окончания и наоборот
Ваш пулреквест опубликован. Посмотреть можно здесь |
Ваш пулреквест опубликован. Посмотреть можно здесь |
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 в моках, если там все на nanoid, то может съехать
- По поводу datepicker, насколько я помню мы его делаем на уровне presenter. Сегодня вечером посмотрю как мы это делали в других работах и скину в чатик
'id': `${id }4c3e4e6-9053-42ce-b747-e281314baa31`, | ||
'title': `Upgrade ${ id}`, | ||
'price': getRandomNumber(19,499) | ||
'id': nanoid(), |
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, если они у тебя рандомно генерятся?
|
||
return Array.from(new Map(mergedEvents.map((event) => [event.id, event])).values()); | ||
}; | ||
const EVENTS_COUNT = 5; |
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.
я бы вынес в файл с константами, но если это только для моков - то можно оставить здесь, главное потом не забыть удалить
evt.preventDefault(); | ||
|
||
const offerId = evt.currentTarget.dataset.offerId; | ||
const offers = new Map (this._state.offers); |
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.
не очень понял зачем здесь делать новую мапу из стейта?
}; | ||
|
||
removeEventListeners() { | ||
this.#rollupButton.removeEventListener('click', this.#clickHandler); | ||
this.#formElement.removeEventListener('submit', this.#submitHandler); | ||
} | ||
|
||
#setDatepicker() { |
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.
насколько я помню, экземпляр datepicker мы делаем на уровне презентера, и передаем уже сюда
🎓 Большие перемены (часть 1)