This commit is contained in:
Eero Antikainen
2024-09-09 21:23:45 +03:00
parent 6f9da73cf7
commit cf5145a908
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -32,9 +32,7 @@ const App = () => {
<Container maxWidth="xl" fixed style={{ marginTop: '2em', marginBottom: '2em' }}>
<Grid item>
<Routes>
{ENV == 'dev' &&
<Route element={crossSearchPage} path="/crosssearch/:id?" />
}
{ENV == 'dev' && <Route element={crossSearchPage} path="/crosssearch/:id?" />}
<Route element={localityPage} path="/locality/:id?" />
<Route element={speciesPage} path="/species/:id?" />
<Route element={referencePage} path="/reference/:id?" />
+2 -2
View File
@@ -65,7 +65,7 @@ export const NavBar = () => {
)
const renderLink = (link: LinkDefinition) => {
if (ENV !== 'dev' && link.title == 'Cross-Search') return null
if (ENV !== 'dev' && link.title == 'Cross-Search') return null
if (link.children) {
return (
<MenuItem key={`${link.url}-menuitem`} style={{ display: 'inline-block', padding: 0 }}>
@@ -128,7 +128,7 @@ export const NavBar = () => {
<Typography fontSize={'2.2em'}>NOW Database {getModeText()}</Typography>
</MenuItem>
<MenuList style={{ alignContent: 'center' }}>
{pages
{pages
.filter(childLink => !childLink.allowedRoles || childLink.allowedRoles.includes(user.role))
.map(page => renderLink(page))}
</MenuList>