From 3d326acba4e26a0e8a3d0ae4b792d3f54a658afb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 24 Sep 2018 18:11:39 -0500 Subject: [PATCH] initial commit --- public/App.js | 0 public/Components/Carousel.js | 0 public/Components/Footer.js | 0 public/Components/Header.js | 0 public/Components/ProductDetail.js | 12 +++++++++ src/index.js | 39 ++++++++++++++++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 public/App.js create mode 100644 public/Components/Carousel.js create mode 100644 public/Components/Footer.js create mode 100644 public/Components/Header.js create mode 100644 public/Components/ProductDetail.js diff --git a/public/App.js b/public/App.js new file mode 100644 index 0000000..e69de29 diff --git a/public/Components/Carousel.js b/public/Components/Carousel.js new file mode 100644 index 0000000..e69de29 diff --git a/public/Components/Footer.js b/public/Components/Footer.js new file mode 100644 index 0000000..e69de29 diff --git a/public/Components/Header.js b/public/Components/Header.js new file mode 100644 index 0000000..e69de29 diff --git a/public/Components/ProductDetail.js b/public/Components/ProductDetail.js new file mode 100644 index 0000000..af76594 --- /dev/null +++ b/public/Components/ProductDetail.js @@ -0,0 +1,12 @@ +function ProductDetails(product) { + return( +
+

{product.ProductsDetails.price}

+

{product.ProductsDetails.name}

+

{product.ProductsDetails.description}

+

{product.ProductsDetails.review}

+

{product.ProductsDetails.stars}

+
+ ) +} +; \ No newline at end of file diff --git a/src/index.js b/src/index.js index e58303d..b37384a 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,46 @@ import App from './App'; import './index.css'; import state from './state'; +function App(props){ + let productDetailComponents= props.products.map(p => ) + return( +
+ {productDetailComponents} +
+ ) + +} ReactDOM.render( , document.getElementById('root') ); + +//all of this information stored in Mlab Database// +/*var productDetails =[ + { id:"1",name:"Body Luxuries Sweet Lavender Hand Sanitizer",description:"Psychotropic drugs, not elsewhere classified", +reviews:"46", rating:"2",imgUrl:"http://dummyimage.com/136x167.bmp/cc0000/ffffff",price:"$95.11"}, +{id:"2",name:"Topiramate",description:"You will be so happy when you use this product",reviews:"2",rating:"2",imgURL:"http://dummyimage.com/125x134.jpg/cc0000/fffff",price:"37.09"}, +{ id:"3",name:"Almond",description:"Other disorders of continuinty of bone,unsp,tibia and fibula",reviews:"27",rating:"5", +imgURL:"http://dummyimage.com/149x190.jpg/dddddd/000000",price:"51.83"}, +{id:"4",name:"VYTORIN",description:"Orchard as the place of occurrence of the external cause",reviews:"60",rating:"3", +imgURL:"http://dummyimage.com/162x153.jpg/cc0000/ffffff",price:"$86.93"}, +{id:"5",name:"Decolorized Iodine",description:"Injury of prostate", reviews:"20",rating:"1",imgUrl:"http://dummyimage.com/120x245.jpg/cc0000/ffffff"},price:"$70.10"}, +{id:"6",name:"Fresh Sugar Honey Tinted Lip Treatment SPF15",description:"this stuff is awesome",reviews:"76",rating:"3",imgURL:"http://dummyimage.com/211x227.bmp/5fa2dd/fffffff", +price:"$39.25"}, +{ id:"7",name:"LBEL",description:"The best product ever",reviews:"76",rating:"3",imgURL:"http://dummyimage.com/212x144.jpg/ff4444/ffffff",price:"99.91"}, +{id: "8",name:"Cholestyramine",description: "Product 3",reviews: "74",rating:"3",imgUrl: "http://dummyimage.com/204x175.jpg/5fa2dd/ffffff", +price: "$67.17"}, +{id:"9",name: "Risperidone",description: " cephalospor/oth beta-lactm antibiot, undet, sequela", +reviews: "9",rating: "1",imgUrl: "http://dummyimage.com/212x108.bmp/cc0000/ffffff",price: "$96.84"}, +{ +id: "10",name: "MAC", +description: "Other Gram-negative sepsis", +reviews: "45",rating: "2",imgUrl: "http://dummyimage.com/189x109.png/cc0000/ffffff",price: "$74.37" +} +]; + +ReactDOM.render( + + document.getElementById('root') +); */ +