diff --git a/src/App.js b/src/App.js index c6e5940..a6d8bc1 100644 --- a/src/App.js +++ b/src/App.js @@ -87,7 +87,7 @@ const App = () => { return (

BD Store

- +
); }; diff --git a/src/components/Product.js b/src/components/Product.js index b497da4..c3b460d 100644 --- a/src/components/Product.js +++ b/src/components/Product.js @@ -1,15 +1,17 @@ /* eslint-disable react/prop-types */ import React from 'react'; -const Product = () => { +const Product = (props) => { + const {product} = props; + const {title, image, price, rating, description} = product; return (
- +
-

product title

-

Price: $ product price

-

Rating: product rating rate/5

-

Description: product.description

+

{title}

+

Price: $ {price}

+

Rating: {rating.rate}/5

+

Description: {description}

diff --git a/src/components/Products.js b/src/components/Products.js index 3da8fdd..657f8f3 100644 --- a/src/components/Products.js +++ b/src/components/Products.js @@ -1 +1,19 @@ /* eslint-disable react/prop-types */ +import Product from "./Product"; + + +function Products (props){ + const {product} = props; + return ( +
+ { + product.map((item)=>{ + + }) + } +
+ ) +} + +export default Products; +