Skip to content

Commit

Permalink
Use PUBLIC_URL in login link
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Apr 26, 2023
1 parent ac99c62 commit 7932b7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 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 } from '../../../config'
import { inProduction, PUBLIC_URL } from '../../../config'

const NavBar = () => {
const { t, i18n } = useTranslation()
Expand Down Expand Up @@ -72,7 +72,10 @@ const NavBar = () => {
</Link>
)}
{location.pathname === '/public' && (
<ExternalLink href="/" style={{ textDecoration: 'none' }}>
<ExternalLink
href={PUBLIC_URL}
style={{ textDecoration: 'none' }}
>
<Button>
<LoginOutlined sx={navStyles.icon} /> {t('login')}
</Button>
Expand Down

0 comments on commit 7932b7b

Please sign in to comment.