in src/components/Cart.tsx [9:33]
export default observer(function Cart() {
const store = getStore();
return (
<div className={cx('cart')}>
{store.cart.books.map(item => {
const book = store.books[item.bookId];
return (
<div
key={item.bookId}
className={cx(
{ selected: store.cart.selectedBookId == item.bookId },
'selectable'
)}>
<strong onClick={() => selectBookInCart(item.bookId)}>{book.name}</strong>(
{item.quantity}) -
<button
onClick={e => {
removeBookFromCart(item.bookId);
e.preventDefault();
}}>
Remove
</button>
</div>
);
})}