Bug library · state · state
Stale cart state
Remove mutates the cart array in place, so React never re-renders and the removed item lingers.
The diff
components/Checkout.tsx- setLines((current) => current.filter((l) => l.sku !== sku));+ setLines((current) => {+ const index = current.findIndex((l) => l.sku === sku);+ if (index >= 0) current.splice(index, 1);+ return current;+ });