Browse Source

Weather forecast screen adjusted when error occours

master
GabrielTrettel 3 years ago
parent
commit
e2d015eb66
  1. 2
      src/app/api/weather_forecast.js
  2. 24
      src/app/screens/ForecastScreen.js

2
src/app/api/weather_forecast.js

@ -28,7 +28,7 @@ function getWeatherForecast() {
rain_fall_mm: 0, rain_fall_mm: 0,
}, },
{ {
week_day: " Terça ",
week_day: "Terça",
date: "20/03", date: "20/03",
weather_index: 2, weather_index: 2,
rain_fall_mm: 5, rain_fall_mm: 5,

24
src/app/screens/ForecastScreen.js

@ -114,7 +114,6 @@ function renderTodayForecast(forecast) {
); );
} }
// FIXME: The border line must be in full wcreen width.
function border() { function border() {
return ( return (
<View <View
@ -267,16 +266,33 @@ function renderScreen(forecast) {
function renderErrorScreen() { function renderErrorScreen() {
return ( return (
<View style={{
flex: 1,
padding: 17,
alignItems: "center",
justifyContent: "center"
}}>
<Text <Text
style={{ style={{
paddingBottom: 20,
textAlign: "center", textAlign: "center",
paddingTop: 30,
fontSize: dimensions.text.secondary,
fontSize: dimensions.text.header,
fontWeight: "bold", fontWeight: "bold",
color: colors.primary,
}} }}
> >
Previsão do tempo não disponível no momento
Ops, algo deu errado...
</Text> </Text>
<Text
style={{
textAlign: "center",
fontSize: dimensions.text.secondary,
fontWeight: "bold",
}}
>Não conseguimos encontrar a previsão do tempo para sua localização</Text>
</View>
); );
} }

Loading…
Cancel
Save