import { useLocation } from 'react-router-dom'; import { Paper, styled, Tab, Tabs } from '@mui/material'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus'; import { CenteredNavLink } from './CenteredNavLink'; const StyledPaper = styled(Paper)(({ theme }) => ({ marginBottom: '1rem', borderRadius: '12.5px', boxShadow: 'none', padding: '0 2rem', })); function AdminMenu() { const { uiConfig } = useUiConfig(); const { pathname } = useLocation(); const { isBilling } = useInstanceStatus(); const { flags } = uiConfig; const activeTab = pathname.split('/')[2]; return ( Users } /> {flags.serviceAccounts && ( Service accounts } /> )} {flags.UG && ( Groups } /> )} {flags.RE && ( Project roles } /> )} API access } /> {uiConfig.flags.embedProxyFrontend && ( CORS origins } /> )} Single sign-on } /> Instance stats } /> {flags.networkView && ( Network } /> )} {flags.maintenance && ( Maintenance } /> )} {isBilling && ( Billing } /> )} ); } export default AdminMenu;