API url as environment variable

This commit is contained in:
Mateusz Tylka 2023-01-12 17:25:13 +01:00
parent 1863373456
commit 42b3995d41
2 changed files with 3 additions and 1 deletions

2
.env
View File

@ -1,3 +1,5 @@
REACT_APP_KC_URL=https://auth-dev.csi.wmi.amu.edu.pl/ REACT_APP_KC_URL=https://auth-dev.csi.wmi.amu.edu.pl/
REACT_APP_KC_REALM=gonito-dev REACT_APP_KC_REALM=gonito-dev
REACT_APP_KC_CLIENT_ID=gonito-dev-heroku REACT_APP_KC_CLIENT_ID=gonito-dev-heroku
REACT_APP_API=https://gonito.net/api

View File

@ -9,7 +9,7 @@ import tabularIco from '../assets/tabular_ico.svg';
const ELEMENTS_PER_PAGE = 12; const ELEMENTS_PER_PAGE = 12;
const MINI_DESCRIPTION_LENGTH = 70; const MINI_DESCRIPTION_LENGTH = 70;
const API = 'https://gonito.net/api'; const API = process.env.REACT_APP_API;
const CHALLENGES_PAGE = '/challenges'; const CHALLENGES_PAGE = '/challenges';
const CHALLENGE_PAGE = '/challenge'; const CHALLENGE_PAGE = '/challenge';
const POLICY_PRIVACY_PAGE = '/policy-privacy'; const POLICY_PRIVACY_PAGE = '/policy-privacy';