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,
},
{
week_day: " Terça ",
week_day: "Terça",
date: "20/03",
weather_index: 2,
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() {
return (
<View
@ -267,16 +266,33 @@ function renderScreen(forecast) {
function renderErrorScreen() {
return (
<View style={{
flex: 1,
padding: 17,
alignItems: "center",
justifyContent: "center"
}}>
<Text
style={{
paddingBottom: 20,
textAlign: "center",
paddingTop: 30,
fontSize: dimensions.text.secondary,
fontSize: dimensions.text.header,
fontWeight: "bold",
color: colors.primary,
}}
>
Previsão do tempo não disponível no momento
Ops, algo deu errado...
</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