From e726e8f703937bba60f43385471aef6526ebe662 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Wed, 5 Aug 2026 18:14:35 +0000 Subject: [PATCH] Deploy --- src/app/cart/page.tsx | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/app/cart/page.tsx diff --git a/src/app/cart/page.tsx b/src/app/cart/page.tsx new file mode 100644 index 0000000..3be56c0 --- /dev/null +++ b/src/app/cart/page.tsx @@ -0,0 +1,70 @@ +'use client' +import { useRouter } from 'next/navigation' +import Link from 'next/link' +import Image from 'next/image' +import { useVulaCart } from '@/hooks/useVulaCart' +import { ArrowRight, Minus, Plus, ShoppingBag, Trash2 } from 'lucide-react' + +function fmt(amount: number) { return `R${(amount / 100).toFixed(2)}` } + +export default function CartPage() { + const { items, subtotal, itemCount, updateQty, removeFromCart } = useVulaCart() + const router = useRouter() + + if (!itemCount) return ( +
+ +

Your cart is empty

+ + Continue Shopping + +
+ ) + + return ( +
+
+

Your Cart ({itemCount} item{itemCount !== 1 ? 's' : ''})

+
+
+ {items.map(item => ( +
+ {item.thumbnail && ( +
+ {item.title} +
+ )} +
+

{item.title}

+ {item.variant_title !== 'Default' &&

{item.variant_title}

} +

{fmt(item.unit_price)}

+
+
+ +
+ + {item.quantity} + +
+

{fmt(item.unit_price * item.quantity)}

+
+
+ ))} +
+
+

Order Summary

+
Subtotal{fmt(subtotal)}
+
DeliveryCalculated at checkout
+
Total{fmt(subtotal)}
+ + Continue Shopping +
+
+
+
+ ) +}