import { Link, useNavigate } from 'react-router-dom' import { useCartStore } from '@/store/cart' import { Button } from '@/components/ui/button' import { Card, CardContent } from '@/components/ui/card' import { Minus, Plus, Trash2, ShoppingBag } from 'lucide-react' function formatPrice(price: number): string { return new Intl.NumberFormat('ja-JP', { style: 'currency', currency: 'JPY' }).format(price) } export function CartPage() { const { items, total, removeItem, updateQuantity } = useCartStore() const navigate = useNavigate() if (items.length === 0) { return (
Your cart is empty.
{item.name}
{formatPrice(item.price)}