mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-14 00:19:16 +01:00
fix build
This commit is contained in:
parent
1686de0fb5
commit
18afc34f85
@ -1,12 +1,12 @@
|
|||||||
import { useEffect, useMemo, useState, VFC } from 'react';
|
import { useEffect, useMemo, useState, VFC } from 'react';
|
||||||
import { useGroups } from 'hooks/api/getters/useGroups/useGroups';
|
import { useGroups } from 'hooks/api/getters/useGroups/useGroups';
|
||||||
import { Link, useNavigate, useSearchParams } from 'react-router-dom';
|
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||||
import { IGroup } from 'interfaces/group';
|
import { IGroup } from 'interfaces/group';
|
||||||
import { PageContent } from 'component/common/PageContent/PageContent';
|
import { PageContent } from 'component/common/PageContent/PageContent';
|
||||||
import { PageHeader } from 'component/common/PageHeader/PageHeader';
|
import { PageHeader } from 'component/common/PageHeader/PageHeader';
|
||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
import { Search } from 'component/common/Search/Search';
|
import { Search } from 'component/common/Search/Search';
|
||||||
import { Button, Grid, useMediaQuery } from '@mui/material';
|
import { Grid, useMediaQuery } from '@mui/material';
|
||||||
import theme from 'themes/theme';
|
import theme from 'themes/theme';
|
||||||
import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
|
import { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
|
||||||
import { TablePlaceholder } from 'component/common/Table';
|
import { TablePlaceholder } from 'component/common/Table';
|
||||||
|
@ -7,7 +7,7 @@ import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResul
|
|||||||
import { useStyles } from './FeatureDetails.styles';
|
import { useStyles } from './FeatureDetails.styles';
|
||||||
import { CloseOutlined } from '@mui/icons-material';
|
import { CloseOutlined } from '@mui/icons-material';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ConditionallyRender } from '../../../../../common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
import {
|
import {
|
||||||
checkForEmptyValues,
|
checkForEmptyValues,
|
||||||
hasCustomStrategies,
|
hasCustomStrategies,
|
||||||
@ -31,13 +31,18 @@ export const FeatureDetails = ({
|
|||||||
? `This feature toggle is True in ${input?.environment} because `
|
? `This feature toggle is True in ${input?.environment} because `
|
||||||
: `This feature toggle is False in ${input?.environment} because `;
|
: `This feature toggle is False in ${input?.environment} because `;
|
||||||
|
|
||||||
const reason = feature.isEnabled
|
const reason = (() => {
|
||||||
? 'at least one strategy is True'
|
if (feature.isEnabled)
|
||||||
: !feature.isEnabledInCurrentEnvironment
|
return 'at least one strategy is True';
|
||||||
? 'the environment is disabled'
|
|
||||||
: hasOnlyCustomStrategies(feature)
|
if (!feature.isEnabledInCurrentEnvironment)
|
||||||
? 'no strategies could be fully evaluated'
|
return 'the environment is disabled';
|
||||||
: 'all strategies are either False or could not be fully evaluated';
|
|
||||||
|
if (hasOnlyCustomStrategies(feature))
|
||||||
|
return 'no strategies could be fully evaluated'
|
||||||
|
|
||||||
|
return 'all strategies are either False or could not be fully evaluated';
|
||||||
|
})()
|
||||||
|
|
||||||
const color = feature.isEnabled
|
const color = feature.isEnabled
|
||||||
? theme.palette.success.main
|
? theme.palette.success.main
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model';
|
import { PlaygroundFeatureSchema } from 'hooks/api/actions/usePlayground/playground.model';
|
||||||
|
|
||||||
export const DEFAULT_STRATEGIES = [
|
export const DEFAULT_STRATEGIES = [
|
||||||
'default',
|
'default',
|
||||||
|
@ -17,7 +17,7 @@ export const useStyles = makeStyles()(theme => ({
|
|||||||
fill: '#fff',
|
fill: '#fff',
|
||||||
},
|
},
|
||||||
accordion: {
|
accordion: {
|
||||||
border: `1px solid ${theme.palette.grey[400]}`,
|
border: `1px solid ${theme.palette.dividerAlternative}`,
|
||||||
borderRadius: theme.spacing(1),
|
borderRadius: theme.spacing(1),
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
|
@ -32,7 +32,7 @@ export const PlaygroundParameterItem = ({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle1" color={theme.palette[color].main}>
|
<Typography variant="subtitle1" color={theme.palette[color].main}>
|
||||||
{input}
|
{`${input}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className={styles.column}>
|
<div className={styles.column}>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
|
@ -9,7 +9,7 @@ const useHiddenColumns = (
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const hidden = condition ? hiddenColumns : [];
|
const hidden = condition ? hiddenColumns : [];
|
||||||
setHiddenColumns(hidden);
|
setHiddenColumns(hidden);
|
||||||
}, [setHiddenColumns, condition]);
|
}, [setHiddenColumns, hiddenColumns, condition]);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useHiddenColumns;
|
export default useHiddenColumns;
|
||||||
|
Loading…
Reference in New Issue
Block a user