-
Notifications
You must be signed in to change notification settings - Fork 16
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
HW6 Navruzov #77
base: master
Are you sure you want to change the base?
HW6 Navruzov #77
Conversation
@@ -10,7 +10,7 @@ export default class App extends PureComponent { | |||
<div> | |||
<Header /> | |||
<Switch> | |||
<Route path="/" exact component={() => <h2>Home page</h2>} /> | |||
<Route path="/" exact component={Restaurants} /> |
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.
тут должен быть Redirect, а не Route
product, | ||
amount, | ||
subtotal, | ||
increment, | ||
decrement, | ||
remove, | ||
}) { | ||
function getRestId() { |
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.
это вычисление нужно перенести в селекторы
@@ -36,10 +36,13 @@ function Restaurants({ restaurants, loading, loaded, loadRestaurants }) { | |||
))} | |||
</div> | |||
<Switch> | |||
<Route path="/restaurants/:restId"> | |||
<Route path="/restaurants/:restId/menu"> |
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.
тут не нужно ничего менять, роутинга в компоненте restaurant достаточно
@@ -21,6 +21,7 @@ function Basket({ title = 'Basket', total, orderProducts }) { | |||
<h4 className={styles.title}>{title}</h4> | |||
{orderProducts.map(({ product, amount, subtotal }) => ( | |||
<BasketItem | |||
restId={restId} |
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.
это лишнее, забыл удалить (пробовал через props restId прокинуть)
No description provided.