diff --git a/car-ui-react/src/components/Elements/ProductCard.js b/car-ui-react/src/components/Elements/ProductCard.js index e095001..5d5498a 100644 --- a/car-ui-react/src/components/Elements/ProductCard.js +++ b/car-ui-react/src/components/Elements/ProductCard.js @@ -2,28 +2,31 @@ import React from 'react'; export const ProductCard = ({product}) => { - const {carId, brand, model, year, color, mileage, price, quantity, tax, poster, in_stock} = product; + const {carId, brand, model, year, color, mileage, price, quantity, tax, in_stock} = product; return (
{/* Best Seller */} -
{brand} {model}
-

{color}

+

Color : {color}

- mileage: {mileage} + Year : {year} +

+ +

+ Mileage : {mileage}

- quantity: {quantity} + Quantity : {quantity}

- tax: {tax} + Tax : {tax}

@@ -36,7 +39,7 @@ export const ProductCard = ({product}) => {

- INR {price} + {price} {/* diff --git a/car-ui-react/src/pages/Products/ProductsList.js b/car-ui-react/src/pages/Products/ProductsList.js index c84abca..42af93b 100644 --- a/car-ui-react/src/pages/Products/ProductsList.js +++ b/car-ui-react/src/pages/Products/ProductsList.js @@ -8,7 +8,7 @@ export const ProductsList = () => { useEffect(() => { async function fetchProducts() { - const response = await fetch("http://localhost:8000/products"); + const response = await fetch("https://my.api.mockaroo.com/model_random.json?key=dcbc8750"); const data = await response.json() setProducts(data); } @@ -25,7 +25,7 @@ export const ProductsList = () => {

- All Cars (10) + All Cars ({products.length})