mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
fix lint
This commit is contained in:
@@ -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?" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user