Skip to content

Commit

Permalink
Only show river UI in local dev for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Nov 11, 2024
1 parent c232c2c commit 83c73f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions web/src/app/main/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ export default function NavBar(): JSX.Element {
const classes = useStyles()
const theme = useTheme()

let localDev = null
let localDevFooter = null
let localDevRiver = null
if (process.env.NODE_ENV !== 'production') {
localDev = <NavBarLink to='/dev' title='Dev' icon={<DeveloperBoard />} />
localDevFooter = (
<NavBarLink to='/dev' title='Dev' icon={<DeveloperBoard />} />
)
localDevRiver = (
<NavBarSubLink newTab to='/admin/riverui' title='Job Queues' />
)
}

const logo =
Expand Down Expand Up @@ -101,13 +107,13 @@ export default function NavBar(): JSX.Element {
/>
<NavBarSubLink to='/admin/switchover' title='Switchover' />
<NavBarSubLink to='/admin/api-keys' title='API Keys' />
<NavBarSubLink newTab to='/admin/riverui' title='Job Queues' />
{localDevRiver}
</NavBarLink>
</RequireConfig>

<NavBarLink to='/wizard' title='Wizard' icon={<WizardIcon />} />

{localDev}
{localDevFooter}
</List>
</nav>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/main/NavBarLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export type NavBarLinkProps = {
icon: JSX.Element
title: string
to: string
children?: JSX.Element[] | JSX.Element
children?: React.ReactNode[] | React.ReactNode
}

export default function NavBarLink({
Expand Down

0 comments on commit 83c73f9

Please sign in to comment.