mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-18 13:48:58 +02:00
fix: prod guard
This commit is contained in:
parent
aaef6ba175
commit
283a908b90
@ -1,3 +1,4 @@
|
|||||||
|
import { useState } from 'react';
|
||||||
import { Dialogue } from 'component/common/Dialogue/Dialogue';
|
import { Dialogue } from 'component/common/Dialogue/Dialogue';
|
||||||
import { Alert } from '@mui/material';
|
import { Alert } from '@mui/material';
|
||||||
import { Checkbox, FormControlLabel } from '@mui/material';
|
import { Checkbox, FormControlLabel } from '@mui/material';
|
||||||
@ -26,9 +27,11 @@ export const FeatureStrategyProdGuard = ({
|
|||||||
}: IFeatureStrategyProdGuardProps) => {
|
}: IFeatureStrategyProdGuardProps) => {
|
||||||
const { value: settings, setValue: setSettings } =
|
const { value: settings, setValue: setSettings } =
|
||||||
getFeatureStrategyProdGuardSettings();
|
getFeatureStrategyProdGuardSettings();
|
||||||
|
const [hide, setHide] = useState(settings.hide);
|
||||||
|
|
||||||
const toggleHideSetting = () => {
|
const toggleHideSetting = () => {
|
||||||
setSettings((prev) => ({ hide: !prev.hide }));
|
setSettings((prev) => ({ hide: !prev.hide }));
|
||||||
|
setHide((prev) => !prev);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -52,7 +55,7 @@ export const FeatureStrategyProdGuard = ({
|
|||||||
label="Don't show again"
|
label="Don't show again"
|
||||||
control={
|
control={
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={settings.hide}
|
checked={hide}
|
||||||
onChange={toggleHideSetting}
|
onChange={toggleHideSetting}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user