Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#929 | OCL Logo should redirect to root for …
Browse files Browse the repository at this point in the history
…non-prod environments
  • Loading branch information
snyaggarwal committed Nov 22, 2021
1 parent 2560f47 commit b71333d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/app/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import makeStyles from '@mui/styles/makeStyles';
import { map, isEmpty, get } from 'lodash';
import {
isAtGlobalSearch, isLoggedIn, isServerSwitched, canSwitchServer, getAppliedServerConfig
isAtGlobalSearch, isLoggedIn, isServerSwitched, canSwitchServer, getAppliedServerConfig, getEnv
} from '../../common/utils';
import { WHITE, BLACK } from '../../common/constants';
import SearchInput from '../search/SearchInput';
Expand Down Expand Up @@ -124,6 +124,8 @@ const Header = props => {
})

const isFHIRServer = get(getAppliedServerConfig(), 'type') === 'fhir';
const env = getEnv()
const isProduction = env === 'production';

return (
<React.Fragment>
Expand All @@ -150,7 +152,7 @@ const Header = props => {
<MenuIcon />
</IconButton>
<Typography variant="h6" className="brand col-sm-1" style={{padding: '0 5px'}}>
<a className="no-anchor-styles" href={SITE_URL} rel="noopener noreferrer">
<a className="no-anchor-styles" href={isProduction ? SITE_URL : '/'} rel="noopener noreferrer">
OCL
</a>
</Typography>
Expand Down

0 comments on commit b71333d

Please sign in to comment.