re-enabling IPFS Gateway links

This commit is contained in:
lamacchinadesiderante 2023-01-10 23:16:57 +01:00
parent 7a47d45721
commit 60f83e28ec
1 changed files with 8 additions and 8 deletions

View File

@ -19,12 +19,12 @@ interface IProps {
const BookDetailsCard: React.FC<IProps> = (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<IProps> = (props) => {
</CardBody>
<CardFooter flexDirection="column">
{/* <SimpleGrid columns={{ sm: 2, md: 3, lg: 4, xl: 5 }} spacing={{ base: 2, md: 4 }}>
<SimpleGrid columns={{ sm: 2, md: 3, lg: 4, xl: 5 }} spacing={{ base: 2, md: 4 }}>
{ipfsGateways.map((gateway) => (
<Button
as={ExternalLink}
@ -100,7 +100,7 @@ const BookDetailsCard: React.FC<IProps> = (props) => {
</Button>
))}
</SimpleGrid> */}
</SimpleGrid>
<Flex><Text fontWeight={'bold'}>{t('disclaimer.nolink_warning')}</Text></Flex>