From b77a511e6245b4d4ca69f8cdd93640a08b7d3caf Mon Sep 17 00:00:00 2001 From: kleap-admin Date: Sun, 18 Jan 2026 18:28:57 +0000 Subject: [PATCH] Update components/product-card.tsx --- components/product-card.tsx | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 components/product-card.tsx diff --git a/components/product-card.tsx b/components/product-card.tsx new file mode 100644 index 0000000..9b48a16 --- /dev/null +++ b/components/product-card.tsx @@ -0,0 +1,61 @@ +"use client"; +import { Card, CardContent } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Product } from "@/lib/data"; +import { Star, ShoppingCart } from "lucide-react"; +import Link from "next/link"; +import { useCart } from "@/lib/use-cart"; + +export function ProductCard({ product }: { product: Product }) { + const { addToCart } = useCart(); + + return ( + + +
+ {product.name} + {product.isOffer && ( +
+ Offer +
+ )} +
+ + +
{product.category}
+ +

+ {product.name} +

+ +
+
+ + {product.rating} +
+ ({product.reviews}) +
+
+
+ ₹{product.price} + {product.originalPrice && ( + ₹{product.originalPrice} + )} +
+ +
+
+
+ ); +}