1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: infinite rendering due to wrong effect deps (#2895)

This commit is contained in:
Mateusz Kwasniewski 2023-01-13 09:02:43 +01:00 committed by GitHub
parent 854810ec49
commit 1b534c0a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ export const FeatureStrategyEdit = () => {
useEffect(() => {
// Fill in the selected segments once they've been fetched.
savedStrategySegments && setSegments(savedStrategySegments);
}, [savedStrategySegments]);
}, [JSON.stringify(savedStrategySegments)]);
const onStrategyEdit = async (payload: IFeatureStrategyPayload) => {
await updateStrategyOnFeature(

View File

@ -4,7 +4,7 @@ import { Visibility, VisibilityOff } from '@mui/icons-material';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
const StyledVisibilityToggle = styled(IconButton, {
shouldForwardProp: prop => prop !== 'highlighted',
shouldForwardProp: prop => prop !== 'visibilityOff',
})<{ visibilityOff: boolean }>(({ theme, visibilityOff }) => ({
marginLeft: 'auto',
marginRight: theme.spacing(-1),