From ad1b7bf8fcdc7d06ee4b32e635af0e08026247dc Mon Sep 17 00:00:00 2001 From: Fredrik Oseberg Date: Wed, 10 Aug 2022 14:29:13 +0200 Subject: [PATCH] fix: remove page content --- .../FeatureStatusCell/FeatureStatusCell.tsx | 4 +- .../PlaygroundResultsTable.tsx | 48 +++++++++++-------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx index efffa73f3a..0a0fe4d692 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureStatusCell/FeatureStatusCell.tsx @@ -20,12 +20,12 @@ const StyledChipWrapper = styled(Box)(() => ({ export const FeatureStatusCell = ({ feature }: IFeatureStatusCellProps) => { const enabled = feature.isEnabled ? true - : feature.strategies.result === false + : feature.strategies?.result === false ? false : 'unknown'; const label = feature.isEnabled ? 'True' - : feature.strategies.result === false + : feature.strategies?.result === false ? 'False' : 'Unknown'; return ( diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/PlaygroundResultsTable.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/PlaygroundResultsTable.tsx index bade0b60e0..4ee0e30ba1 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/PlaygroundResultsTable.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/PlaygroundResultsTable.tsx @@ -219,26 +219,34 @@ export const PlaygroundResultsTable = ({ }, [loading, sortBy, searchValue]); return ( - - } + <> + + + {features !== undefined && !loading + ? `Results (${ + rows.length < data.length + ? `${rows.length} of ${data.length}` + : data.length + })` + : 'Results'} + + + - } - > + ( @@ -284,6 +292,6 @@ export const PlaygroundResultsTable = ({ )} /> - + ); };