diff --git a/advanced-react-address-book b/advanced-react-address-book deleted file mode 160000 index 3edcdb1..0000000 --- a/advanced-react-address-book +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3edcdb1fc5800dd364201c5030c13f2fcf7287f7 diff --git a/src/App.js b/src/App.js index 4139cab..286dccb 100644 --- a/src/App.js +++ b/src/App.js @@ -1,8 +1,14 @@ import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; +import ProductDetail from './components/ProductDetail.js'; + +function App(props) { + var productdisplay=[]; + for (var i = 0; i < props.products.length; i++) { + productdisplay.push(); + } -function App() { return (
@@ -86,122 +92,7 @@ function App() {
-
-
- -
-

$24.99

-

First Product -

-

See more snippets like this online store item at Bootsnipp - http://bootsnipp.com.

-
-
-

15 reviews

-

- - - - - -

-
-
-
- -
-
- -
-

$64.99

-

Second Product -

-

This is a short description. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
-
-

12 reviews

-

- - - - - -

-
-
-
- -
-
- -
-

$74.99

-

Third Product -

-

This is a short description. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
-
-

31 reviews

-

- - - - - -

-
-
-
- -
-
- -
-

$84.99

-

Fourth Product -

-

This is a short description. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
-
-

6 reviews

-

- - - - - -

-
-
-
- -
-
- -
-

$94.99

-

Fifth Product -

-

This is a short description. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
-
-

18 reviews

-

- - - - - -

-
-
-
- -
-

Like this template? -

-

If you like this template, then check out this tutorial on how to build a working review system for your online store!

- View Tutorial -
+ {productdisplay}
diff --git a/src/App.test.js b/src/App.test.js index b84af98..7c83683 100644 --- a/src/App.test.js +++ b/src/App.test.js @@ -6,3 +6,4 @@ it('renders without crashing', () => { const div = document.createElement('div'); ReactDOM.render(, div); }); + diff --git a/src/components/Carousel.js b/src/components/Carousel.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Footer.js b/src/components/Footer.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Header.js b/src/components/Header.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/ProductDetail.js b/src/components/ProductDetail.js new file mode 100644 index 0000000..a0db31e --- /dev/null +++ b/src/components/ProductDetail.js @@ -0,0 +1,36 @@ +import React from "react" + +function rating(input) { + var n = parseInt(input) + var rating = []; + for (var i = 0; i < n; i++) { + rating.push(); + } + return rating; +} + +function ProductDetail(props) { + return (
+
+ +
+

{props.product.price}

+

{props.product.name} +

+

{props.product.description} Bootsnipp - http://bootsnipp.com.

+
+
+

{props.product.reviews}

+

+ + {props.product.rating}; + +

+
+
+
) + + +} + +export default ProductDetail; \ No newline at end of file diff --git a/src/index.js b/src/index.js index e58303d..75a9c11 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,6 @@ import './index.css'; import state from './state'; ReactDOM.render( - , + , document.getElementById('root') );