+
+
+
+ );
}
export default ItemCard;
diff --git a/src/components/ItemCard/ItemCard.scss b/src/components/ItemCard/ItemCard.scss
index 3005341..4ea079d 100644
--- a/src/components/ItemCard/ItemCard.scss
+++ b/src/components/ItemCard/ItemCard.scss
@@ -1,2 +1,8 @@
-.ItemCard {
+.item-card {
+ padding: 1rem;
+
+ &__image {
+ width: 100%;
+ border-radius: 5px;
+ }
}
diff --git a/src/components/ItemCard/index.js b/src/components/ItemCard/index.js
index e69de29..59ad792 100644
--- a/src/components/ItemCard/index.js
+++ b/src/components/ItemCard/index.js
@@ -0,0 +1 @@
+export { default } from "./ItemCard";
diff --git a/src/components/Main/Main.js b/src/components/Main/Main.js
index c26fa07..4fda16f 100644
--- a/src/components/Main/Main.js
+++ b/src/components/Main/Main.js
@@ -1,7 +1,7 @@
import React from "react";
-function Main() {
- return ;
+function Main({ children, ...props }) {
+ return {children};
}
export default Main;
diff --git a/src/components/Main/index.js b/src/components/Main/index.js
index e69de29..0fdf55f 100644
--- a/src/components/Main/index.js
+++ b/src/components/Main/index.js
@@ -0,0 +1 @@
+export { default } from "./Main";
diff --git a/src/components/ProductsListing/ProductsListing.js b/src/components/ProductsListing/ProductsListing.js
index 0af92a3..7f9c1c9 100644
--- a/src/components/ProductsListing/ProductsListing.js
+++ b/src/components/ProductsListing/ProductsListing.js
@@ -1,13 +1,33 @@
import React from "react";
-// import ItemCard from "../ItemCard";
+import ItemCard from "../ItemCard";
-function ProductsListing() {
+function ProductsListing({
+ products,
+ handleDownVote,
+ handleUpVote,
+ handleSetFavourite,
+ handleAddToCart,
+ ...props
+}) {
return (
-
- {/* {products.map((product) => (
-
- ))} */}
+
+ {products.map((product) => (
+
+ ))}
);
}
diff --git a/src/components/ProductsListing/index.js b/src/components/ProductsListing/index.js
index e69de29..f2739d0 100644
--- a/src/components/ProductsListing/index.js
+++ b/src/components/ProductsListing/index.js
@@ -0,0 +1 @@
+export { default } from "./ProductsListing";
diff --git a/src/index.js b/src/index.js
index 19bb154..4d58953 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,6 +2,7 @@ import React from "react";
import ReactDOM from "react-dom";
import "bootstrap/dist/css/bootstrap.min.css";
+import "./assets/styles/index.scss";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
diff --git a/src/pages/Home/Home.js b/src/pages/Home/Home.js
index e7c62c2..dced57b 100644
--- a/src/pages/Home/Home.js
+++ b/src/pages/Home/Home.js
@@ -1,17 +1,17 @@
import React from "react";
-// import products from "../../utils/demo-data";
+import products from "../../utils/demo-data";
import AppHeader from "../../components/AppHeader";
import Main from "../../components/Main";
import Footer from "../../components/Footer";
-// import ProductsListing from "../../components/ProductsListing";
+import ProductsListing from "../../components/ProductsListing";
function Home() {
- // function handleDownVote() {}
- // function handleUpVote() {}
- // function handleSetFavorite() {}
- // function handleAddToCart() {}
+ function handleDownVote() {}
+ function handleUpVote() {}
+ function handleSetFavorite() {}
+ function handleAddToCart() {}
return (
<>
@@ -24,7 +24,13 @@ function Home() {
Buy now!
- {/* */}
+
>
From 04f4bbd72110e240e9c1974eea526f60b529781c Mon Sep 17 00:00:00 2001
From: Arantza
Date: Fri, 17 Sep 2021 14:41:45 +0200
Subject: [PATCH 2/2] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8964edd..5b7236d 100644
--- a/README.md
+++ b/README.md
@@ -327,4 +327,4 @@ specification. Contributions of any kind welcome!
## Repository
-All the process is included in this repository:
\ No newline at end of file
+All the process is included in this repository: [Workflow repository](https://github.com/AranBeitia/react-Shopping-components)