diff --git a/src/components/BookDetails/index.tsx b/src/components/BookDetails/index.tsx new file mode 100644 index 00000000..a8329e08 --- /dev/null +++ b/src/components/BookDetails/index.tsx @@ -0,0 +1,111 @@ +import Button from '@app/components/Common/Button'; +import PageTitle from '@app/components/Common/PageTitle'; +import { useUser } from '@app/hooks/useUser'; +import axios from 'axios'; +import { useState } from 'react'; + +interface BookDetailsProps { + book?: any; +} + +const BookDetails = ({ book }: BookDetailsProps) => { + const { user } = useUser(); + const [requesting, setRequesting] = useState(false); + const [requested, setRequested] = useState(false); + + if (!book) { + return ( +
+ by {book.author.name} +
+ )} ++ {book.pageCount} pages ยท{' '} + {book.releaseDate?.substring(0, 4)} +
+ )} +{book.overview}
++ {artist.disambiguation} +
+ )} ++ {album.releaseDate?.substring(0, 4)} ยท {album.albumType} +
+Albums
++ {artist.statistics.albumCount} +
+Tracks
++ {artist.statistics.totalTrackCount} +
+On Disk
++ {artist.statistics.trackFileCount} +
+Size
++ {(artist.statistics.sizeOnDisk / 1073741824).toFixed(1)} GB +
++ {artist.artistType || 'Artist'} + {artist.inLibrary && ' ยท โ In Library'} +
++ {book.author?.name || ''} + {book.releaseDate && ` ยท ${book.releaseDate.substring(0, 4)}`} +
+