diff --git a/client/src/components/layout/CartDrawer.tsx b/client/src/components/layout/CartDrawer.tsx new file mode 100644 index 0000000..47e9992 --- /dev/null +++ b/client/src/components/layout/CartDrawer.tsx @@ -0,0 +1,90 @@ +import { X, Trash2, ShoppingBag } from "lucide-react"; +import { Link } from "wouter"; +import { useCart } from "../../hooks/use-cart"; + +export default function CartDrawer() { + const { items, isOpen, closeCart, updateQuantity, removeItem, subtotal } = useCart(); + + if (!isOpen) return null; + + return ( + <> +
+Your cart is empty
+ +{item.title}
+ {item.variantTitle && item.variantTitle !== "Default Title" && ( +{item.variantTitle}
+ )} +${parseFloat(item.price).toFixed(2)}
+Taxes and shipping calculated at checkout
+ + Checkout · ${subtotal.toFixed(2)} + +