mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
fix: remove page content
This commit is contained in:
parent
a01bbb2db9
commit
ad1b7bf8fc
@ -20,12 +20,12 @@ const StyledChipWrapper = styled(Box)(() => ({
|
|||||||
export const FeatureStatusCell = ({ feature }: IFeatureStatusCellProps) => {
|
export const FeatureStatusCell = ({ feature }: IFeatureStatusCellProps) => {
|
||||||
const enabled = feature.isEnabled
|
const enabled = feature.isEnabled
|
||||||
? true
|
? true
|
||||||
: feature.strategies.result === false
|
: feature.strategies?.result === false
|
||||||
? false
|
? false
|
||||||
: 'unknown';
|
: 'unknown';
|
||||||
const label = feature.isEnabled
|
const label = feature.isEnabled
|
||||||
? 'True'
|
? 'True'
|
||||||
: feature.strategies.result === false
|
: feature.strategies?.result === false
|
||||||
? 'False'
|
? 'False'
|
||||||
: 'Unknown';
|
: 'Unknown';
|
||||||
return (
|
return (
|
||||||
|
@ -219,26 +219,34 @@ export const PlaygroundResultsTable = ({
|
|||||||
}, [loading, sortBy, searchValue]);
|
}, [loading, sortBy, searchValue]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContent
|
<>
|
||||||
isLoading={loading}
|
<Box
|
||||||
header={
|
sx={{
|
||||||
<PageHeader
|
display: 'flex',
|
||||||
titleElement={`Results (${
|
justifyContent: 'space-between',
|
||||||
rows.length < data.length
|
alignItems: 'center',
|
||||||
? `${rows.length} of ${data.length}`
|
mb: 3,
|
||||||
: data.length
|
}}
|
||||||
})`}
|
>
|
||||||
actions={
|
<Typography variant="subtitle1" sx={{ ml: 1 }}>
|
||||||
<Search
|
{features !== undefined && !loading
|
||||||
initialValue={searchValue}
|
? `Results (${
|
||||||
onChange={setSearchValue}
|
rows.length < data.length
|
||||||
hasFilters
|
? `${rows.length} of ${data.length}`
|
||||||
getSearchContext={getSearchContext}
|
: data.length
|
||||||
/>
|
})`
|
||||||
}
|
: 'Results'}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
<Search
|
||||||
|
initialValue={searchValue}
|
||||||
|
onChange={setSearchValue}
|
||||||
|
hasFilters
|
||||||
|
getSearchContext={getSearchContext}
|
||||||
|
disabled={loading}
|
||||||
|
containerStyles={{ marginLeft: '1rem', maxWidth: '400px' }}
|
||||||
/>
|
/>
|
||||||
}
|
</Box>
|
||||||
>
|
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={!loading && !data}
|
condition={!loading && !data}
|
||||||
show={() => (
|
show={() => (
|
||||||
@ -284,6 +292,6 @@ export const PlaygroundResultsTable = ({
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</PageContent>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user