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

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-unleash committed Aug 8, 2022
1 parent dacacca commit d6a0189
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/component/admin/groups/GroupsList/GroupsList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useEffect, useMemo, useState, VFC } from 'react';
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 { PageContent } from 'component/common/PageContent/PageContent';
import { PageHeader } from 'component/common/PageHeader/PageHeader';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
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 { SearchHighlightProvider } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
import { TablePlaceholder } from 'component/common/Table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResul
import { useStyles } from './FeatureDetails.styles';
import { CloseOutlined } from '@mui/icons-material';
import React from 'react';
import { ConditionallyRender } from '../../../../../common/ConditionallyRender/ConditionallyRender';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import {
checkForEmptyValues,
hasCustomStrategies,
Expand All @@ -31,13 +31,18 @@ export const FeatureDetails = ({
? `This feature toggle is True in ${input?.environment} because `
: `This feature toggle is False in ${input?.environment} because `;

const reason = feature.isEnabled
? 'at least one strategy is True'
: !feature.isEnabledInCurrentEnvironment
? 'the environment is disabled'
: hasOnlyCustomStrategies(feature)
? 'no strategies could be fully evaluated'
: 'all strategies are either False or could not be fully evaluated';
const reason = (() => {
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 'all strategies are either False or could not be fully evaluated';
})()

const color = feature.isEnabled
? theme.palette.success.main
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = [
'default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const useStyles = makeStyles()(theme => ({
fill: '#fff',
},
accordion: {
border: `1px solid ${theme.palette.grey[400]}`,
border: `1px solid ${theme.palette.dividerAlternative}`,
borderRadius: theme.spacing(1),
backgroundColor: '#fff',
boxShadow: 'none',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const PlaygroundParameterItem = ({
)}
>
<Typography variant="subtitle1" color={theme.palette[color].main}>
{input}
{`${input}`}
</Typography>
<div className={styles.column}>
<ConditionallyRender
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHiddenColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const useHiddenColumns = (
useEffect(() => {
const hidden = condition ? hiddenColumns : [];
setHiddenColumns(hidden);
}, [setHiddenColumns, condition]);
}, [setHiddenColumns, hiddenColumns, condition]);
};

export default useHiddenColumns;

0 comments on commit d6a0189

Please sign in to comment.