From b9ce991a33a3fc315a57056fb66d9806c612c580 Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 9 Jun 2026 22:45:19 +0000 Subject: [PATCH] Add src/app/cart/page.tsx --- src/app/cart/page.tsx | 132 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 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..1937fa9 --- /dev/null +++ b/src/app/cart/page.tsx @@ -0,0 +1,132 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import ReactLenis from "lenis/react"; +import { CartProvider, useCart } from "@/context/cartContext"; +import ProductCart from '@/components/ecommerce/cart/ProductCart'; +import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline'; +import FooterLogoEmphasis from '@/components/sections/footer/FooterLogoEmphasis'; + +export default function CartPage() { + return ( + + + + + + + + + + ); +} + +function CartContent() { + const { cartItems, removeFromCart, updateQuantity, getTotalPrice } = useCart(); + + const handleQuantityChange = (id: string, quantity: number) => { + updateQuantity(id, quantity); + }; + + const handleRemove = (id: string) => { + removeFromCart(id); + }; + + return ( +
+ {}} // No close action for a dedicated page + items={cartItems.map(item => ({...item, variants: item.variant ? [item.variant] : []}))} + onQuantityChange={handleQuantityChange} + onRemove={handleRemove} + total={getTotalPrice()} + title="Your Shopping Cart" + emptyMessage="Your cart is currently empty. Start exploring our exquisite collection to find your next luxury item!" + buttons={[ + { + text: "Continue Shopping", href: "/"}, + { + text: "Proceed to Checkout", onClick: () => alert("Proceeding to checkout!"), // Placeholder for checkout logic + }, + ]} + /> +
+ ); +}