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:
parent
79e96fdb98
commit
0a9fdfc3df
@ -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: {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user