Skip to content

Commit

Permalink
fix: handle null values for country key indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Jan 12, 2024
1 parent 8d7d17a commit dbdd9f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/CountryProfileOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function Component() {
/>
<TextOutput
label={strings.countryIndicatorsUrbanPopulationLabel}
value={`${indicatorResponse?.urban_population} %`}
value={isDefined(indicatorResponse?.urban_population) ? `${indicatorResponse?.urban_population} %` : undefined}
valueType="text"
strongValue
/>
Expand All @@ -63,7 +63,7 @@ export function Component() {
/>
<TextOutput
label={strings.countryIndicatorsPovertyLabel}
value={`${indicatorResponse?.poverty} %`}
value={isDefined(indicatorResponse?.poverty) ? `${indicatorResponse?.poverty} %` : undefined}
valueType="text"
strongValue
/>
Expand All @@ -75,7 +75,7 @@ export function Component() {
/>
<TextOutput
label={strings.countryIndicatorsLiteracyLabel}
value={`${indicatorResponse?.literacy} %`}
value={isDefined(indicatorResponse?.literacy) ? `${indicatorResponse?.literacy} %` : undefined}
valueType="text"
strongValue
/>
Expand Down

0 comments on commit dbdd9f3

Please sign in to comment.