1
- import { fade , Theme } from "@material-ui/core"
2
1
import ListItem from "@material-ui/core/ListItem"
3
2
import ListItemText from "@material-ui/core/ListItemText"
3
+ import { fade , makeStyles , Theme } from "@material-ui/core/styles"
4
4
import AdminIcon from "@material-ui/icons/SettingsOutlined"
5
- import { makeStyles } from "@material-ui/styles"
6
5
import React , { useState } from "react"
7
6
import { useNavigate } from "react-router-dom"
8
7
import { navHeight } from "../../../theme/constants"
@@ -12,7 +11,8 @@ import { BuildingIcon } from "../../Icons/BuildingIcon"
12
11
import { UsersOutlinedIcon } from "../../Icons/UsersOutlinedIcon"
13
12
import { CloseDropdown , OpenDropdown } from "../Arrows"
14
13
15
- const Language = {
14
+ export const Language = {
15
+ menuTitle : "Admin" ,
16
16
usersLabel : "Users" ,
17
17
usersDescription : "Manage users, roles, and permissions." ,
18
18
orgsLabel : "Organizations" ,
@@ -53,7 +53,7 @@ export const AdminDropdown: React.FC = () => {
53
53
< >
54
54
< div className = { styles . link } >
55
55
< ListItem selected = { Boolean ( anchorEl ) } button onClick = { onOpenAdminMenu } >
56
- < ListItemText className = "no-brace" color = "primary" primary = "Admin" />
56
+ < ListItemText className = "no-brace" color = "primary" primary = { Language . menuTitle } />
57
57
{ anchorEl ? < CloseDropdown /> : < OpenDropdown /> }
58
58
</ ListItem >
59
59
</ div >
@@ -74,22 +74,20 @@ export const AdminDropdown: React.FC = () => {
74
74
variant = "admin-dropdown"
75
75
onClose = { onClose }
76
76
>
77
- { entries . map ( ( entry ) =>
78
- entry . label && entry . Icon ? (
79
- < BorderedMenuRow
80
- description = { entry . description }
81
- Icon = { entry . Icon }
82
- key = { entry . label }
83
- path = { entry . path }
84
- title = { entry . label }
85
- variant = "narrow"
86
- onClick = { ( ) => {
87
- onClose ( )
88
- navigate ( entry . path )
89
- } }
90
- />
91
- ) : null ,
92
- ) }
77
+ { entries . map ( ( entry ) => (
78
+ < BorderedMenuRow
79
+ description = { entry . description }
80
+ Icon = { entry . Icon }
81
+ key = { entry . label }
82
+ path = { entry . path }
83
+ title = { entry . label }
84
+ variant = "narrow"
85
+ onClick = { ( ) => {
86
+ onClose ( )
87
+ navigate ( entry . path )
88
+ } }
89
+ />
90
+ ) ) }
93
91
</ BorderedMenu >
94
92
</ >
95
93
)
0 commit comments