Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-unleash committed Aug 8, 2022
1 parent d6a0189 commit 8be74e6
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
PlaygroundFeatureSchema,
PlaygroundRequestSchema,
} from '../../../../../../hooks/api/actions/usePlayground/playground.model';
} from 'hooks/api/actions/usePlayground/playground.model';
import { Alert, IconButton, Typography, useTheme } from '@mui/material';
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
import { useStyles } from './FeatureDetails.styles';
Expand Down Expand Up @@ -32,17 +32,16 @@ export const FeatureDetails = ({
: `This feature toggle is False in ${input?.environment} because `;

const reason = (() => {
if (feature.isEnabled)
return 'at least one strategy is True';
if (feature.isEnabled) return 'at least one strategy is True';

if (!feature.isEnabledInCurrentEnvironment)
return 'the environment is disabled';

if (hasOnlyCustomStrategies(feature))
return 'no strategies could be fully evaluated'
return 'no strategies could be fully evaluated';

return 'all strategies are either False or could not be fully evaluated';
})()
})();

const color = feature.isEnabled
? theme.palette.success.main
Expand Down

0 comments on commit 8be74e6

Please sign in to comment.