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, isEnterprise } = useUiConfig(); const { pathname } = useLocation(); const { isBilling } = useInstanceStatus(); const { flags, networkViewEnabled } = uiConfig; const activeTab = pathname.split('/')[2]; return ( Users } /> {isEnterprise() && ( Service accounts } /> )} {flags.UG && ( Groups } /> )} {flags.RE && ( Project roles } /> )} API access } /> {uiConfig.flags.embedProxyFrontend && ( CORS origins } /> )} Single sign-on } /> Instance stats } /> {networkViewEnabled && ( Network } /> )} Maintenance } /> {isBilling && ( Billing } /> )} ); } export default AdminMenu;