"use client"; import { useCart } from "@/lib/use-cart"; import { Container } from "@/components/container"; import { Heading } from "@/components/heading"; import { Button } from "@/components/ui/button"; import { Footer } from "@/components/footer"; import { Trash2, Plus, Minus, ShoppingBag, ArrowRight } from "lucide-react"; import Link from "next/link"; export default function CartPage() { const { cart, updateQuantity, removeFromCart, total } = useCart(); if (cart.length === 0) { return ( Your cart is empty Looks like you haven't added anything to your cart yet. Start Shopping ); } return ( Shopping Cart {cart.map((item) => ( {item.name} {item.category} updateQuantity(item.id, item.quantity - 1)} className="p-1 hover:text-blue-600" > {item.quantity} updateQuantity(item.id, item.quantity + 1)} className="p-1 hover:text-blue-600" > removeFromCart(item.id)} className="text-red-500 hover:text-red-600 p-1" > ₹{item.price * item.quantity} ₹{item.price} each ))} Order Summary Subtotal ₹{total} Shipping FREE Tax (GST) ₹{Math.round(total * 0.18)} Total ₹{total + Math.round(total * 0.18)} Checkout Secure checkout powered by BharatPay ); }
Looks like you haven't added anything to your cart yet.
{item.category}
Secure checkout powered by BharatPay