mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-13 13:48:59 +02:00
fix: do not show flagsPerUser when calculation results to NaN
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
84707e2bf3
commit
020dc9a220
@ -83,7 +83,11 @@ export const FlagStats: React.FC<IFlagStatsProps> = ({
|
|||||||
</StyledRingContainer>
|
</StyledRingContainer>
|
||||||
|
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={flagsPerUser !== undefined && flagsPerUser !== ''}
|
condition={
|
||||||
|
flagsPerUser !== undefined &&
|
||||||
|
flagsPerUser !== '' &&
|
||||||
|
flagsPerUser !== 'NaN'
|
||||||
|
}
|
||||||
show={
|
show={
|
||||||
<StyledInsightsContainer>
|
<StyledInsightsContainer>
|
||||||
<StyledTextContainer>
|
<StyledTextContainer>
|
||||||
@ -102,7 +106,7 @@ export const FlagStats: React.FC<IFlagStatsProps> = ({
|
|||||||
</Typography>
|
</Typography>
|
||||||
</StyledTextContainer>
|
</StyledTextContainer>
|
||||||
<StyledFlagCountPerUser>
|
<StyledFlagCountPerUser>
|
||||||
{flagsPerUser}
|
{flagsPerUser ?? 'N/A'}
|
||||||
</StyledFlagCountPerUser>
|
</StyledFlagCountPerUser>
|
||||||
</StyledInsightsContainer>
|
</StyledInsightsContainer>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user