techmatters / terraso-mobile-client

A React Native project for Terraso’s LandPKS mobile application.
https://landpks.terraso.org
GNU Affero General Public License v3.0
2 stars 0 forks source link

Elevation does not render "unknown" result in the UI #1787

Closed paulschreiber closed 1 month ago

paulschreiber commented 1 month ago

Description

When a user taps on a location outside the US, the elevation API returns a string:

Invalid or missing input parameters.

Our elevationServices.ts file calls getElevation(), which handles that and correctly returns undefined.

The renderElevationfile correctly handles undefined and renders "unknown".

However, somewhere in between (perhaps in elevationSlice?), the unknown value gets lost and doesn't get passed up the client layer.

DerekCaelin commented 1 month ago

@CourtneyLee333 I tested this by tapping in Africa. Field returns "unknown" (lowercase) so it passes functionally - should we stylize the word?

CourtneyLee333 commented 1 month ago

No, I think it's fine the way it is.