From cae9b26a0d2208823bec28ab190817438c91be10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 24 Jan 2025 16:43:15 +0100 Subject: [PATCH] fix: change env source to meta instead of process --- govtool/frontend/src/utils/mapDtoToDrep.ts | 2 +- govtool/frontend/src/utils/openInNewTab.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/utils/mapDtoToDrep.ts b/govtool/frontend/src/utils/mapDtoToDrep.ts index 458473b8e..ab5655025 100644 --- a/govtool/frontend/src/utils/mapDtoToDrep.ts +++ b/govtool/frontend/src/utils/mapDtoToDrep.ts @@ -34,7 +34,7 @@ export const mapDtoToDrep = async (dto: DrepDataDTO): Promise => { if (dto.imageUrl) { fetch( isIPFSImage - ? `${process.env.VITE_IPFS_GATEWAY}/${dto.imageUrl?.slice(7)}` + ? `${import.meta.env.VITE_IPFS_GATEWAY}/${dto.imageUrl?.slice(7)}` : dto.imageUrl, isIPFSImage ? { diff --git a/govtool/frontend/src/utils/openInNewTab.ts b/govtool/frontend/src/utils/openInNewTab.ts index 847b0ed5d..6f888f4b1 100644 --- a/govtool/frontend/src/utils/openInNewTab.ts +++ b/govtool/frontend/src/utils/openInNewTab.ts @@ -4,7 +4,7 @@ export const openInNewTab = (url: string) => { url.startsWith("http://") || url.startsWith("https://") ? url : url.startsWith("ipfs") - ? `${process.env.VITE_IPFS_GATEWAY}/${url.slice(7)}` + ? `${import.meta.env.VITE_IPFS_GATEWAY}/${url.slice(7)}` : `https://${url}`; const newWindow = window.open(fullUrl, "_blank", "noopener,noreferrer");