+
+ {cartProducts.length > 0 && (
+
+
{cartProducts?.length}
+
+ )}
diff --git a/src/components/shop/ProductCard.jsx b/src/components/shop/ProductCard.jsx
index 61edd15a..cbd9ac00 100644
--- a/src/components/shop/ProductCard.jsx
+++ b/src/components/shop/ProductCard.jsx
@@ -35,7 +35,9 @@ function ProductCard({ product }) {
className="flex justify-between pr-1"
>
- {product.name}
+ {product.name.length > 15
+ ? `${product.name.slice(0, 18)}...`
+ : product.name}
{totalStock > 0 ? (
diff --git a/src/pages/shop/SingleItemPage.jsx b/src/pages/shop/SingleItemPage.jsx
index ecb54c52..e0cf2c7f 100644
--- a/src/pages/shop/SingleItemPage.jsx
+++ b/src/pages/shop/SingleItemPage.jsx
@@ -128,6 +128,8 @@ export default function SingleItemPage() {
});
// Add to local storage
addToLocalStorage();
+ // dispatch custom event to notify cart change
+ window.dispatchEvent(new Event("swagListUpdated"));
// open cart
setOpen(true);
@@ -177,7 +179,7 @@ export default function SingleItemPage() {
key={index}
src={image}
alt={singleSwag.name}
- className={`m-auto min-w-full ${selectedImage === index + 1 ? "block" : "hidden"}`}
+ className={`m-auto rounded-lg min-w-full ${selectedImage === index + 1 ? "block" : "hidden"}`}
/>
))}
diff --git a/src/pages/shop/sections/Banner/Carousal.jsx b/src/pages/shop/sections/Banner/Carousal.jsx
index d010902e..c84663da 100644
--- a/src/pages/shop/sections/Banner/Carousal.jsx
+++ b/src/pages/shop/sections/Banner/Carousal.jsx
@@ -85,7 +85,7 @@ function Carousel() {
From KES {formatPrice(swagList[selectedIndex]?.price)}
Shop Now