fix: hide book img if none
This commit is contained in:
parent
7b8be10851
commit
afe3e153e2
2 changed files with 24 additions and 3 deletions
|
@ -3,12 +3,31 @@
|
|||
<url><loc>https://www.aaronjy.me/</loc><priority>1</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/about/</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/cv/</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/library/</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/tags/</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/</loc><priority>0.8</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/library/1984/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/A-Monster-Calls/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/Diary-of-An-Oxygen-Thief/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/No-God-But-God/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/Sex--Punishment/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/The-Nature-of-Alexander/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/a-night-to-remember/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/alice-in-wonderland/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/animal-farm/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/cities-that-shaped-the-ancient-world/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/song-of-achilles/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/starmaker/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/stasiland/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/stray-reflections/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/the-marmalade-diaries/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/the-midnight-library/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/to-be-taught-if-fortunate/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/library/when-the-moon-hits-your-eye/</loc></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/attitudes-to-reading/</loc><lastmod>Tue, 18 Mar 2025 00:00:00 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/moving-from-github-to-forgejo/</loc><lastmod>Sun, 16 Mar 2025 00:00:00 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/performance-considerations-tcp-game-server/</loc><lastmod>Fri, 21 Mar 2025 21:12:47 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/quick-reflection-katherine-may/</loc><lastmod>Sun, 09 Mar 2025 00:00:00 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/static-site-on-google-cloud/</loc><lastmod>Wed, 01 May 2024 00:00:00 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/</loc><lastmod>Mon, 18 Mar 2024 16:47:32 GMT</lastmod><priority>0.6</priority></url>
|
||||
<url><loc>https://www.aaronjy.me/writing/support-content-file-structure-changes-on-a-static-site/</loc><lastmod>Mon, 18 Mar 2024 16:47:32 GMT</lastmod><priority>0.6</priority></url>
|
||||
</urlset>
|
|
@ -28,10 +28,12 @@ function Book ({ attributes, html }) {
|
|||
|
||||
<div>
|
||||
<div className={style.layout}>
|
||||
<Image src={attributes.thumbnailUrl} width={250} height={580} alt='' className={style.thumbnail} />
|
||||
{attributes.thumbnailUrl &&
|
||||
<Image src={attributes.thumbnailUrl} width={250} height={580} alt='' className={style.thumbnail} />}
|
||||
<div>
|
||||
<div data-test='content' dangerouslySetInnerHTML={{ __html: html || '<p>(no review)</p>' }} />
|
||||
<p>
|
||||
<span className='bold'>Genres:</span> {attributes.tags}<br />
|
||||
<span className='bold'>Rating:</span> {attributes.stars}/5<br />
|
||||
<span className='bold'>Read on:</span> {formatDate(attributes.readDate)}
|
||||
</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue