Ticket MUST be completed before getting help from an instructor
Name: Erica Thompson
Group: None
#### Book / Chapter:
Kandy Korner Chapter 10
#### Have you searched the other issue tickets? If not, do that first.
- [x ] Yes
- If No, stop and search.
#### REQUIRED Add Tags to Issue Ticket and Assign to Project Board
[x ] Added label to specific project/assignment that you need help with
[ x] Added to c46 Help-Thread project board
REQUIRED Describe your issue:
I have created a function to map over products and pull the information for the type.
REQUIRED List any error messages that appear:
TypeError: Cannot read property 'type' of undefined
REQUIRED What have you googled? (You must have at least 3 links related to your issue)
REQUIRED: What have you tried? Tell us everything you have tried.
I have tried walking through the code which led me to the Product Context on the Product Provider which seems to be just fine. It is connected to setProducts from useState.
REQUIRED: Copy/paste link TO THE FILE on your branch that you are having issues with
Ticket MUST be completed before getting help from an instructor
Name: Erica Thompson
Group: None
#### Book / Chapter: Kandy Korner Chapter 10 #### Have you searched the other issue tickets? If not, do that first. - [x ] Yes - If No, stop and search. #### REQUIRED Add Tags to Issue Ticket and Assign to Project Boardc46 Help-Thread
project boardREQUIRED Describe your issue:
REQUIRED: What have you tried? Tell us everything you have tried.
<div className="product__price">Price: {productProps.price}</div> {/* <div className="product__productType">ProductType: {productPicked.type}</div> */} {products.map(product => { const productPicked = products.find(productPickedAndPurchased => productPickedAndPurchased.id === product.locationId) {console.log(productPicked)} return <div className="product__productType">ProductType: {productPicked.type}</div> })}