Skip to content

Commit 86235b8

Browse files
authored
Merge pull request #2719 from IntersectMBO/fix/2711-governance-action-references-break-withipfs
fix(#2711): fix opening ipfs links
2 parents b7bdf89 + a39fabf commit 86235b8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ changes.
1616

1717
### Fixed
1818

19-
-
19+
- Fix opening IPFS links [Issue 2711](https://github.com/IntersectMBO/govtool/issues/2711)
2020

2121
### Changed
2222

govtool/frontend/src/utils/openInNewTab.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ export const openInNewTab = (url: string) => {
33
const fullUrl =
44
url.startsWith("http://") || url.startsWith("https://")
55
? url
6+
: url.startsWith("ipfs")
7+
? `${process.env.VITE_IPFS_GATEWAY}/${url.slice(7)}`
68
: `https://${url}`;
79

810
const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer");

0 commit comments

Comments
 (0)