1
0
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:
andreas-unleash 2024-03-20 17:30:21 +02:00
parent 84707e2bf3
commit 020dc9a220
No known key found for this signature in database
GPG Key ID: 86EF87A739B39099

View File

@ -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>
} }