Skip to content

Commit

Permalink
Merge pull request #664 from fmidev/feature/662-fix-degree-character-…
Browse files Browse the repository at this point in the history
…position

issue-662: Changed wind direction unit position in latest observations
  • Loading branch information
AnttiRumpunen authored Nov 7, 2024
2 parents 54f0bb3 + ff6c51a commit c884bbd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/weather/observation/Latest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const Latest: React.FC<LatestProps> = ({
latestObservation.windCompass8
? t(`windDirection.${latestObservation.windCompass8}`)
: '-'
} (${value})`;
} (${value}${unit})`;
}

if (value === '-') return null;
Expand All @@ -156,9 +156,11 @@ const Latest: React.FC<LatestProps> = ({
<Text
style={[styles.panelValue, { color: colors.hourListText }]}
accessibilityLabel={`${value} ${
unit ? t(`paramUnits.${unit}`) : ''
unit && parameter !== 'windDirection'
? t(`paramUnits.${unit}`)
: ''
}`}>
{value} {unit}
{value} {parameter !== 'windDirection' ? unit : ''}
</Text>
</View>
</View>
Expand Down

0 comments on commit c884bbd

Please sign in to comment.