diff --git a/src/client/components/NavBar/NavBar.tsx b/src/client/components/NavBar/NavBar.tsx index bd60f936..ab9d8915 100644 --- a/src/client/components/NavBar/NavBar.tsx +++ b/src/client/components/NavBar/NavBar.tsx @@ -25,7 +25,7 @@ import { useTranslation } from 'react-i18next' import hyLogo from '../../assets/hy_logo.svg' import styles from '../../styles' import useLoggedInUser from '../../hooks/useLoggedInUser' -import { inProduction, PUBLIC_URL } from '../../../config' +import { inProduction, FULL_URL } from '../../../config' const NavBar = () => { const { t, i18n } = useTranslation() @@ -72,10 +72,7 @@ const NavBar = () => { )} {location.pathname === '/public' && ( - + diff --git a/src/config.ts b/src/config.ts index e06a589a..43d9a9ec 100644 --- a/src/config.ts +++ b/src/config.ts @@ -14,3 +14,10 @@ export const DEFAULT_SURVEY_NAME = process.env.DEFAULT_SURVEY_NAME || 'testSurvey' export const FORM_DATA_KEY = 'curre_local_save' + +// eslint-disable-next-line no-nested-ternary +export const FULL_URL = inProduction + ? 'https://curre.helsinki.fi' + : inStaging + ? 'https://toska-staging.cs.helsinki.fi/kliksutin' + : 'http://localhost:3000'