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 { Alert } from '@mui/material';
|
||||
import { Checkbox, FormControlLabel } from '@mui/material';
|
||||
@ -26,9 +27,11 @@ export const FeatureStrategyProdGuard = ({
|
||||
}: IFeatureStrategyProdGuardProps) => {
|
||||
const { value: settings, setValue: setSettings } =
|
||||
getFeatureStrategyProdGuardSettings();
|
||||
const [hide, setHide] = useState(settings.hide);
|
||||
|
||||
const toggleHideSetting = () => {
|
||||
setSettings((prev) => ({ hide: !prev.hide }));
|
||||
setHide((prev) => !prev);
|
||||
};
|
||||
|
||||
return (
|
||||
@ -52,7 +55,7 @@ export const FeatureStrategyProdGuard = ({
|
||||
label="Don't show again"
|
||||
control={
|
||||
<Checkbox
|
||||
checked={settings.hide}
|
||||
checked={hide}
|
||||
onChange={toggleHideSetting}
|
||||
/>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user