Skip to content

Commit 97c355c

Browse files
committed
chore: add ipfs debug logs
1 parent 5d915d9 commit 97c355c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

govtool/frontend/src/utils/mapDtoToDrep.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export const mapDtoToDrep = async (dto: DrepDataDTO): Promise<DRepData> => {
3232
let base64Image = null;
3333
const isIPFSImage = dto.imageUrl?.startsWith("ipfs://") || false;
3434
if (dto.imageUrl) {
35+
// eslint-disable-next-line no-console
36+
console.debug("Fetching image", dto.imageUrl);
3537
fetch(
3638
isIPFSImage
3739
? `${import.meta.env.VITE_IPFS_GATEWAY}/${dto.imageUrl?.slice(7)}`

govtool/frontend/src/utils/openInNewTab.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export const openInNewTab = (url: string) => {
77
? `${import.meta.env.VITE_IPFS_GATEWAY}/${url.slice(7)}`
88
: `https://${url}`;
99

10+
// Open the URL in a new tab
11+
console.debug("Opening in new tab", fullUrl);
12+
1013
const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer");
1114
if (newWindow) newWindow.opener = null;
1215
};

0 commit comments

Comments
 (0)