diff --git a/README.md b/README.md
index 4bb0678..3773f9a 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,6 @@ Fork, clone, run yarn install, yarn start, pull request
* Import and use this component in ProductDetail
* This component will take a product from props
* It will show the number of reviews followed by "review" or "reviews" depending on if there is one or more reviews
- * It will create a list of the reviews description which will inititally be hidden
+ * It will create a list of the reviews description which will initially be hidden
* When the word "review" is clicked show the reviews
* When clicked again, hide the reviews
diff --git a/src/App.js b/src/App.js
index 8dfa97f..d37bf15 100644
--- a/src/App.js
+++ b/src/App.js
@@ -8,7 +8,7 @@ import Carousel from './components/Carousel';
function App (props) {
var products = props.state.products.map(function(prod){
- return
15 reviews
+{stars}
diff --git a/src/components/Reviews.js b/src/components/Reviews.js new file mode 100644 index 0000000..0d6036e --- /dev/null +++ b/src/components/Reviews.js @@ -0,0 +1,43 @@ +import React from "react"; + +class Reviews extends React.Component { + constructor(){ + super(); + this.state = { + visible: false + } + + this.numOfReviews = ""; + this.reviewList = []; + } + + handleReviewClick = ()=> { + if(this.state.visible) { + this.reviewList = []; + } else { + this.reviewList = this.props.reviews.map((review, indx) => { + return1 review
; + } else { + this.numOfReviews ={this.props.reviews.length} reviews
; + } + return( +