Kimberly-Hart / East-Barley

1 stars 1 forks source link

product details - beer #83

Closed phillipsja97 closed 4 years ago

phillipsja97 commented 4 years ago

UserStory

AC

WHEN The user clicks on an individual beer item THEN A modal will pop up with more details on that item AND The user will see two options: An add item to cart and go to card, and an add item to cart but keep shopping button.

DevNotes

export default ProductModal;

* In ```SingleBeer.js```  add this in the state:

state = { modalOpen: false }

* Use this import statement in ```SingleBeer.js```: ```import ProductModal from '../ProductModal/ProductModal';```
* Add these functions in ```SingleBeer.js```

handleOpen = () => this.setState({ modalOpen: true })

handleClose = () => this.setState({ modalOpen: false })

* At the bottom of the render() in ```SingleBeer.js```use the ProductModal:

* In the ProductModal use the product data props to fill out the card info.
* For now, set the buttons in the modal to just return an 'alert('Todo later')';