diff --git a/src/components/FilterPanel/FilterPanel.jsx b/src/components/FilterPanel/FilterPanel.jsx index a95a611..b61fce9 100644 --- a/src/components/FilterPanel/FilterPanel.jsx +++ b/src/components/FilterPanel/FilterPanel.jsx @@ -12,7 +12,7 @@ const optionsData = { }, }; -const FilterPanel = ({ currentAmount, totalAmount, onFilter }) => { +const FilterPanel = ({ currentAmount = 0, totalAmount = 0, onFilter }) => { return ( <>
diff --git a/src/components/Products/ProductsList.jsx b/src/components/Products/ProductsList.jsx index b7d339a..0400563 100644 --- a/src/components/Products/ProductsList.jsx +++ b/src/components/Products/ProductsList.jsx @@ -28,40 +28,44 @@ const ProductsList = () => { jump(1); }; - if (filteredProducts.length) { - return ( - <> - -
- {currentData().map((item, key) => { - return ( - - ); - })} -
-
-
-
    - - -
-
-
- - ); - } return ( -
-

No hay productos

-
+ <> + {filteredProducts.length ? ( + <> + +
+ {currentData().map((item, key) => { + return ( + + ); + })} +
+
+
+
    + + +
+
+
+ + ) : ( + <> + +
+

No hay productos

+
+ + )} + ); }; export default ProductsList; diff --git a/src/components/ProductsHistory/ProductsHistory.jsx b/src/components/ProductsHistory/ProductsHistory.jsx index 6703d02..8cb4910 100644 --- a/src/components/ProductsHistory/ProductsHistory.jsx +++ b/src/components/ProductsHistory/ProductsHistory.jsx @@ -28,34 +28,38 @@ const ProductsHistory = () => { jump(1); }; - if (filteredProducts.length) { - return ( - <> - -
- {currentData().map((item, key) => { - return ; - })} -
-
-
-
    - - -
-
-
- - ); - } return ( -
-

No hay productos canjeados

-
+ <> + {filteredProducts.length ? ( + <> + +
+ {currentData().map((item, key) => { + return ; + })} +
+
+
+
    + + +
+
+
+ + ) : ( + <> + +
+

No hay productos

+
+ + )} + ); }; export default ProductsHistory; diff --git a/src/components/ProductsHistory/RedeemedProduct.jsx b/src/components/ProductsHistory/RedeemedProduct.jsx index f7a2ca3..6e0c7d6 100644 --- a/src/components/ProductsHistory/RedeemedProduct.jsx +++ b/src/components/ProductsHistory/RedeemedProduct.jsx @@ -15,6 +15,7 @@ const Product = ({
{category}

{name}

+ {cost} coins
); diff --git a/src/components/ProductsHistory/history.scss b/src/components/ProductsHistory/history.scss deleted file mode 100644 index e69de29..0000000