-
Notifications
You must be signed in to change notification settings - Fork 13
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
HT5 #45
base: master
Are you sure you want to change the base?
HT5 #45
Conversation
(only for current restaurant)
(for all restaurants)
(should be fixed)
|
||
componentDidUpdate(prevProps) { | ||
if (this.props.restaurantId !== prevProps.restaurantId) { | ||
this.props.loadProducts(this.props.restaurantId); |
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.
тут на сколько я понимаю нет проверок, что у нас уже загружены продукты и они будут грузиться постоянно при переходе по ресторанам
case LOAD_PRODUCTS + SUCCESS: | ||
return { | ||
...state, | ||
menu: arrToMap(data), |
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.
тут данные с предыдущих загрузок перетираются новыми
No description provided.