From c593cd89f9d71d6e6071665b5c98e13b298e91fc Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:07:04 +0200 Subject: [PATCH] move hard-coded env vars to constants.js --- frontend/frontend/src/constants.js | 6 ++++++ frontend/frontend/src/pages/Home/Home.js | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/frontend/src/constants.js b/frontend/frontend/src/constants.js index ea6ffc99..218ae404 100644 --- a/frontend/frontend/src/constants.js +++ b/frontend/frontend/src/constants.js @@ -31,3 +31,9 @@ export const BACKEND_URL = PROD : 'http://localhost:8000'; export const CURR_YEAR = 2024; + +window.process = { + env: { + PAT_1: 'myDummyPAT', + }, +}; diff --git a/frontend/frontend/src/pages/Home/Home.js b/frontend/frontend/src/pages/Home/Home.js index b94683b4..b8893412 100644 --- a/frontend/frontend/src/pages/Home/Home.js +++ b/frontend/frontend/src/pages/Home/Home.js @@ -140,11 +140,6 @@ const HomeScreen = () => { }); const res = createMockRes(); try { - window.process = { - env: { - PAT_1: 'myDummyPAT', - }, - }; await router(req, res); const body = res._getBody(); const status = res._getStatusCode();