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>
|
||||
|
||||
<ConditionallyRender
|
||||
condition={flagsPerUser !== undefined && flagsPerUser !== ''}
|
||||
condition={
|
||||
flagsPerUser !== undefined &&
|
||||
flagsPerUser !== '' &&
|
||||
flagsPerUser !== 'NaN'
|
||||
}
|
||||
show={
|
||||
<StyledInsightsContainer>
|
||||
<StyledTextContainer>
|
||||
@ -102,7 +106,7 @@ export const FlagStats: React.FC<IFlagStatsProps> = ({
|
||||
</Typography>
|
||||
</StyledTextContainer>
|
||||
<StyledFlagCountPerUser>
|
||||
{flagsPerUser}
|
||||
{flagsPerUser ?? 'N/A'}
|
||||
</StyledFlagCountPerUser>
|
||||
</StyledInsightsContainer>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user