1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

fix flickering toggle (#2584)

This commit is contained in:
Mateusz Kwasniewski 2022-12-02 08:54:37 +01:00 committed by GitHub
parent 79e96fdb98
commit 0a9fdfc3df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -5,7 +5,7 @@ export const useStyles = makeStyles()(theme => ({
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
minHeight: '100vh',
backgroundColor: theme.palette.background.paper,
},
img: {

View File

@ -53,6 +53,7 @@ export const ChangeRequestConfiguration: VFC = () => {
isEnabled: false,
requiredApprovals: 1,
});
const theme = useTheme();
const projectId = useRequiredPathParam('projectId');
const { data, loading, refetchChangeRequestConfig } =
@ -79,12 +80,7 @@ export const ChangeRequestConfiguration: VFC = () => {
if (dialogState.enableEnvironment) {
await updateConfiguration();
}
setDialogState({
isOpen: false,
enableEnvironment: '',
isEnabled: false,
requiredApprovals: 1,
});
setDialogState(state => ({ ...state, isOpen: false }));
};
async function updateConfiguration(config?: IChangeRequestConfig) {