From 60f83e28ecb672a6482b7eb7cbd2e2554fda1af9 Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Tue, 10 Jan 2023 23:16:57 +0100 Subject: [PATCH] re-enabling IPFS Gateway links --- frontend/src/components/BooksDetailsCard.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/BooksDetailsCard.tsx b/frontend/src/components/BooksDetailsCard.tsx index 98ac9ee..295ff7e 100644 --- a/frontend/src/components/BooksDetailsCard.tsx +++ b/frontend/src/components/BooksDetailsCard.tsx @@ -19,12 +19,12 @@ interface IProps { const BookDetailsCard: React.FC = (props) => { - // const downloadLinkFromIPFS = (gateway: string, book: Book) => { - // return ( - // `https://${gateway}/ipfs/${book.ipfs_cid}?filename=` + - // encodeURIComponent(`${book.title}_${book.author}.${book.extension}`) - // ); - // } + const downloadLinkFromIPFS = (gateway: string, book: Book) => { + return ( + `https://${gateway}/ipfs/${book.ipfs_cid}?filename=` + + encodeURIComponent(`${book.title}_${book.author}.${book.extension}`) + ); + } const { t } = useTranslation(); @@ -88,7 +88,7 @@ const BookDetailsCard: React.FC = (props) => { - {/* + {ipfsGateways.map((gateway) => ( ))} - */} + {t('disclaimer.nolink_warning')}