Skip to content

Commit

Permalink
grin doesnt know how pinned gateways work
Browse files Browse the repository at this point in the history
  • Loading branch information
lyoshenka committed Mar 20, 2024
1 parent 119c029 commit 38ee507
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export type ResolvableImage = {
export const getImageUrl = (imageUrl: string, useGateway = false) => {
return imageUrl.startsWith('ipfs://')
? imageUrl.replace('ipfs://', useGateway ? OWNED_GATEWAY : DEFAULT_GATEWAY)
: imageUrl.startsWith('https://ipfs.io/ipfs/')
? imageUrl.replace(
'https://ipfs.io/ipfs/',
useGateway ? OWNED_GATEWAY : DEFAULT_GATEWAY
)
: imageUrl
}

Expand Down

0 comments on commit 38ee507

Please sign in to comment.