by Minor49er · 6y ago · 0 comments
Why not just use this? https://www.typelit.io/chapters/5f468ca35e91c10be0883a57/The...
Also, the JSON object is fault tolerant and will display whatever you want for a title, even if there isn't a book available: https://www.typelit.io/chapters/%7B%22%64%69%73%70%6C%61%79%...
{"bookTitle": "The Call of Cthulhu", "displayTitle": "The Call of Cthulhu", "language": "English", "bookId": "5f468ca35e91c10be0883a57"}
Why do you need all the others besides "bookId"?
Changing "bookTitle" and "language" don't seem to do anything. Changing "displayTitle" does change the displayed title, but why can't you get that using the bookId?
const MyPage = (props: { query: { par1: string; par2: number } }) => ( <div>{`${props.query.par1}-${props.query.par2}`}</div> );