Skip to content

Commit

Permalink
Fix login redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Aug 25, 2023
1 parent 2db3d27 commit 7b68803
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/client/components/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { Language, LoginOutlined, LogoutOutlined } from '@mui/icons-material'
import { useTranslation } from 'react-i18next'

import { HOST_NAME } from '../../../config'
import { BASE_PATH } from '../../../config'
import useCurrentUser from '../../hooks/useCurrentUser'
import hyLogo from '../../assets/hy_logo.svg'
import styles from './styles'
Expand Down Expand Up @@ -57,7 +57,7 @@ const NavBar = () => {
<Box>
{user ? (
<Link
href={`${HOST_NAME}/api/logout`}
href={`${BASE_PATH}/api/logout`}
style={{ textDecoration: 'none' }}
>
<Button>
Expand All @@ -66,7 +66,7 @@ const NavBar = () => {
</Link>
) : (
<Link
href={`${HOST_NAME}/api/oidc`}
href={`${BASE_PATH}/api/oidc`}
style={{ textDecoration: 'none' }}
>
<Button>
Expand Down
2 changes: 0 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ export const inProduction = !inStaging && process.env.NODE_ENV === 'production'
export const inE2EMode = process.env.E2E === 'true'

export const BASE_PATH = process.env.BASE_PATH || ''

export const HOST_NAME = process.env.HOST_NAME || 'http://localhost:3000'

0 comments on commit 7b68803

Please sign in to comment.