diff --git a/govtool/frontend/src/utils/mapDtoToDrep.ts b/govtool/frontend/src/utils/mapDtoToDrep.ts index ab5655025..b0f1e4b1f 100644 --- a/govtool/frontend/src/utils/mapDtoToDrep.ts +++ b/govtool/frontend/src/utils/mapDtoToDrep.ts @@ -32,6 +32,8 @@ export const mapDtoToDrep = async (dto: DrepDataDTO): Promise => { 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)}` diff --git a/govtool/frontend/src/utils/openInNewTab.ts b/govtool/frontend/src/utils/openInNewTab.ts index 6f888f4b1..f1d0c2402 100644 --- a/govtool/frontend/src/utils/openInNewTab.ts +++ b/govtool/frontend/src/utils/openInNewTab.ts @@ -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; };