Skip to content

Commit

Permalink
chore: use env to handle show/hide brand
Browse files Browse the repository at this point in the history
  • Loading branch information
issambaccouch committed Oct 12, 2023
1 parent ec87fa7 commit 8521fbc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions JeMPI_Apps/JeMPI_UI/.env.local
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
REACT_APP_JEMPI_BASE_URL=http://localhost:50000/JeMPI
REACT_APP_MAX_UPLOAD_CSV_SIZE_IN_BYTES= 128 * 1024 * 1024
REACT_APP_SHOW_BRAND_LOGO="true"
REACT_APP_MOCK_BACKEND=false
REACT_APP_ENABLE_SSO=false

Expand Down
24 changes: 14 additions & 10 deletions JeMPI_Apps/JeMPI_UI/src/components/shell/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import JembiLogo from './JembiLogo'
import NavigationMenu from './NavigationMenu'
import { Link } from 'react-router-dom'

const showBrand =
process.env.REACT_APP_SHOW_BRAND_LOGO === 'false' ? false : true
const LabeledIconBox = ({
icon,
label,
Expand Down Expand Up @@ -62,15 +64,17 @@ const NavigationBar = () => {
}
const drawer = (
<>
{/* <div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
}}
>
<JembiLogo />
</div> */}
{showBrand && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
}}
>
<JembiLogo />
</div>
)}
<Divider />
<Box
sx={{
Expand Down Expand Up @@ -140,7 +144,7 @@ const NavigationBar = () => {
width: { xs: '100%', md: 'auto' }
}}
>
{/* <JembiLogo /> */}
{showBrand && <JembiLogo />}
</Box>
<Box
sx={{
Expand Down
1 change: 1 addition & 0 deletions devops/linux/docker/conf/env/create-env-linux-high-1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export REACT_APP_JEMPI_BASE_URL=http://${NODE1_IP}:50000/JeMPI
export REACT_APP_MOCK_BACKEND="false"
export REACT_APP_ENABLE_SSO="false"
export REACT_APP_MAX_UPLOAD_CSV_SIZE_IN_BYTES= 128 * 1024 * 1024
export REACT_APP_SHOW_BRAND_LOGO="true"


# DON'T CHANGE
Expand Down
2 changes: 1 addition & 1 deletion devops/linux/docker/conf/env/create-env-linux-low-1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export REACT_APP_JEMPI_BASE_URL=http://${NODE1_IP}:50000/JeMPI
export REACT_APP_MOCK_BACKEND="false"
export REACT_APP_ENABLE_SSO="false"
export REACT_APP_MAX_UPLOAD_CSV_SIZE_IN_BYTES= 128 * 1024 * 1024

export REACT_APP_SHOW_BRAND_LOGO="true"
# DON'T CHANGE
export REGISTRY_NODE_IP=${NODE1}:5000/v2

Expand Down

0 comments on commit 8521fbc

Please sign in to comment.