const PRODUCTS = [ const { items, update, remove, subtotal, clear } = useCartContext(); return (
{items.length === 0 &&

Your cart is empty.

} {items.map((it) => (
{it.name}
${""}{it.price.toFixed(2)} each
update(it.id, Number(e.target.value))} className="w-20 h-8 rounded-xl" />
${""}{(it.qty * it.price).toFixed(2)}
))} {items.length > 0 && (
Subtotal${""}{subtotal.toFixed(2)}

Taxes and shipping calculated at checkout. For livestock reservations, we’ll follow up by email.

)}
); } function Footer() { return ( ); } export default function App() { const { route, navigate } = useHashRoute(); const cart = useCart(); return (
); }