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

Video-54-Add-Category-Sidebar-And-Filter #56

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

basir
Copy link
Owner

@basir basir commented Nov 25, 2020

No description provided.

@basir basir merged commit 7407c6f into master Nov 25, 2020
@@ -35,6 +38,22 @@ export const productListReducer = (
}
};

export const productCategoryListReducer = (
state = { loading: true, products: [] },

Choose a reason for hiding this comment

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

Why on this line was 'products' not switched to 'categories' ?

Or is it simply not being utilized at all and has nothing to do with the SUCCESS categories return, and therefore could have been deleted?

Choose a reason for hiding this comment

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

Most likely due to the fact that we're returning distinct products based on the category property of Product. On the models there is no dedicated Category model therefore no category._id hence products cannot be switched to categories.

export const listProducts = ({
seller = '',
name = '',
category = '',
Copy link

Choose a reason for hiding this comment

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

I'm getting a : TypeError: Cannot read property 'category' of undefined

Choose a reason for hiding this comment

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

I am also facing the same error

This pull request was closed.
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.

5 participants