import React from 'react'; import { NavLink, useLocation } from 'react-router-dom'; import { Paper, Tab, Tabs } from '@mui/material'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus'; const navLinkStyle = { display: 'flex', justifyContent: 'center', alignItems: 'center', width: '100%', textDecoration: 'none', color: 'inherit', padding: '0.8rem 1.5rem', }; const activeNavLinkStyle: React.CSSProperties = { fontWeight: 'bold', borderRadius: '3px', padding: '0.8rem 1.5rem', }; const createNavLinkStyle = (props: { isActive: boolean; }): React.CSSProperties => { return props.isActive ? { ...navLinkStyle, ...activeNavLinkStyle } : navLinkStyle; }; function AdminMenu() { const { uiConfig } = useUiConfig(); const { pathname } = useLocation(); const { isBilling } = useInstanceStatus(); const { flags } = uiConfig; return ( Users } /> {flags.RE && ( Project Roles } /> )} API Access } /> Single Sign-On } /> {isBilling && ( Billing } /> )} ); } export default AdminMenu;