diff --git a/src/Components/SavedItems.jsx b/src/Components/SavedItems.jsx index 15eb4cc..c3590f3 100644 --- a/src/Components/SavedItems.jsx +++ b/src/Components/SavedItems.jsx @@ -1,109 +1,82 @@ import React from "react" -import {useContext} from "react" -import {SavedContext} from "../Context/SavedContext" +import { useContext } from "react" +import { SavedContext } from "../Context/SavedContext" import { ShopContext } from "../Context/ShopContext"; +import { Link } from "react-router-dom"; -const SavedItems=()=>{ - const {all_products,listItem,AddToList,RemoveFromList,getListQuantity}=useContext(SavedContext) - const {AddToCart}=useContext(ShopContext) +const SavedItems = () => { + const { all_products, listItem, AddToList, RemoveFromList, getListQuantity } = useContext(SavedContext) + const { AddToCart } = useContext(ShopContext) - return( - <> - -
Total products Wishlisted:
{getListQuantity()}
- {(item.name.length > 40) ? ( - // Truncate the name to the maximum length - item.name.substring(0, 40) + "..." - ): (item.name) - } -
-Category: {item.category}
-${item.new_price}
${item.old_price}
{item.name}
-#Category:{item.category}
-${item.new_price}
-${item.old_price}
- -Seems like you do not have any wishes here.
Make a wish!
Total products Wishlisted:
{getListQuantity()}
++ {(item.name.length > 40) ? ( + // Truncate the name to the maximum length + item.name.substring(0, 40) + "..." + ) : (item.name) + } +
+Category: {item.category}
+${item.new_price}
${item.old_price}