Skip to content

Commit

Permalink
Use full url in login link
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Apr 27, 2023
1 parent 7932b7b commit 6cee817
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/client/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -72,10 +72,7 @@ const NavBar = () => {
</Link>
)}
{location.pathname === '/public' && (
<ExternalLink
href={PUBLIC_URL}
style={{ textDecoration: 'none' }}
>
<ExternalLink href={FULL_URL} style={{ textDecoration: 'none' }}>
<Button>
<LoginOutlined sx={navStyles.icon} /> {t('login')}
</Button>
Expand Down
7 changes: 7 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 6cee817

Please sign in to comment.