update ternary in book.js.jsx