Skip to content

Commit

Permalink
Merge pull request #2719 from IntersectMBO/fix/2711-governance-action…
Browse files Browse the repository at this point in the history
…-references-break-withipfs

fix(#2711): fix opening ipfs links
  • Loading branch information
Ryun1 authored Jan 24, 2025
2 parents b7bdf89 + a39fabf commit 86235b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ changes.

### Fixed

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

### Changed

Expand Down
2 changes: 2 additions & 0 deletions govtool/frontend/src/utils/openInNewTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export const openInNewTab = (url: string) => {
const fullUrl =
url.startsWith("http://") || url.startsWith("https://")
? url
: url.startsWith("ipfs")
? `${process.env.VITE_IPFS_GATEWAY}/${url.slice(7)}`
: `https://${url}`;

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

0 comments on commit 86235b8

Please sign in to comment.