Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions govtool/frontend/src/utils/mapDtoToDrep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const mapDtoToDrep = async (dto: DrepDataDTO): Promise<DRepData> => {
let base64Image = null;
const isIPFSImage = dto.imageUrl?.startsWith("ipfs://") || false;
if (dto.imageUrl) {
// eslint-disable-next-line no-console
console.debug("Fetching image", dto.imageUrl);
fetch(
isIPFSImage
? `${import.meta.env.VITE_IPFS_GATEWAY}/${dto.imageUrl?.slice(7)}`
Expand Down
3 changes: 3 additions & 0 deletions govtool/frontend/src/utils/openInNewTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const openInNewTab = (url: string) => {
? `${import.meta.env.VITE_IPFS_GATEWAY}/${url.slice(7)}`
: `https://${url}`;

// Open the URL in a new tab
console.debug("Opening in new tab", fullUrl);

const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer");
if (newWindow) newWindow.opener = null;
};