Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

HW6 Navruzov #77

wants to merge 1 commit into from

Conversation

lfnickname
Copy link

No description provided.

@@ -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} />
Copy link
Owner

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() {
Copy link
Owner

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">
Copy link
Owner

@koretskiyav koretskiyav Nov 2, 2021

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}
Copy link
Owner

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.

это лишнее, забыл удалить (пробовал через props restId прокинуть)

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