From 6cee81789b33258ebf9e571993a257b6ec5a4bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=20Keskim=C3=A4ki?= Date: Thu, 27 Apr 2023 09:31:18 +0300 Subject: [PATCH] Use full url in login link --- src/client/components/NavBar/NavBar.tsx | 7 ++----- src/config.ts | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) 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'