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} + )} +
+ +
+
+
+ ); +}