in src/components/Description.tsx [10:23]
export default observer(function Description() {
const store = getStore();
const selectedBookId = getSelectedBookId();
const book = selectedBookId !== null && store.books[selectedBookId];
return (
<div className={cx('description')}>
{book && <h2>{book.name}</h2>}
{book ? book.description : 'Select a book to see description'}
{selectedBookId && (
<div>
<button onClick={() => addBookToCart(selectedBookId!)}>Add to Cart</button>
</div>
)}