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

Ht6 #53

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Ht6 #53

wants to merge 5 commits into from

Conversation

tatiyanakryzhnyaya
Copy link

No description provided.

@@ -28,6 +28,18 @@ export const restaurantsListSelector = createSelector(
Object.values
);

export const restaurantIdByProductIdSelector = (state, props) =>
Object.values(restaurantsSelector(state)).find((rest) =>
Copy link
Owner

Choose a reason for hiding this comment

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

вот это сложное вычисление будет вызываться для каждого элемента в корзине, можно сделать немного лучше - изначальны вычислить соотношение этих id, а потом в этой мапе уже их брать

Copy link
Author

Choose a reason for hiding this comment

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

"Изначально вычислить" немного не поняла. Вычислить ид ресторана где-то выше по родителям и прокинуть в basket item пропсом?

… HT6

# Conflicts:
#	README.md
#	src/components/basket/basket-item/basket-item.js
#	src/pages/restaurants-page.js
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