mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
* fix: misc ui fixes post tables upgrade * fix: update snaps, small cleanup * refactor: ReportCard to styled, misc improvements * cleanup remaining styles file * rename `Feature Toggle Name` to just `name` * refactor: address PR comments
23 lines
751 B
TypeScript
23 lines
751 B
TypeScript
import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton';
|
|
import { Add } from '@mui/icons-material';
|
|
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
|
import { useNavigate } from 'react-router-dom';
|
|
|
|
export const CreateEnvironmentButton = () => {
|
|
const { uiConfig } = useUiConfig();
|
|
const navigate = useNavigate();
|
|
|
|
return (
|
|
<ResponsiveButton
|
|
onClick={() => navigate('/environments/create')}
|
|
maxWidth="700px"
|
|
Icon={Add}
|
|
permission={ADMIN}
|
|
disabled={!Boolean(uiConfig.flags.EEA)}
|
|
>
|
|
New environment
|
|
</ResponsiveButton>
|
|
);
|
|
};
|