mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +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',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
height: '100%',
|
minHeight: '100vh',
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
},
|
},
|
||||||
img: {
|
img: {
|
||||||
|
@ -53,6 +53,7 @@ export const ChangeRequestConfiguration: VFC = () => {
|
|||||||
isEnabled: false,
|
isEnabled: false,
|
||||||
requiredApprovals: 1,
|
requiredApprovals: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const projectId = useRequiredPathParam('projectId');
|
const projectId = useRequiredPathParam('projectId');
|
||||||
const { data, loading, refetchChangeRequestConfig } =
|
const { data, loading, refetchChangeRequestConfig } =
|
||||||
@ -79,12 +80,7 @@ export const ChangeRequestConfiguration: VFC = () => {
|
|||||||
if (dialogState.enableEnvironment) {
|
if (dialogState.enableEnvironment) {
|
||||||
await updateConfiguration();
|
await updateConfiguration();
|
||||||
}
|
}
|
||||||
setDialogState({
|
setDialogState(state => ({ ...state, isOpen: false }));
|
||||||
isOpen: false,
|
|
||||||
enableEnvironment: '',
|
|
||||||
isEnabled: false,
|
|
||||||
requiredApprovals: 1,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function updateConfiguration(config?: IChangeRequestConfig) {
|
async function updateConfiguration(config?: IChangeRequestConfig) {
|
||||||
|
Loading…
Reference in New Issue
Block a user