Skip to content

Commit

Permalink
added new types of climate
Browse files Browse the repository at this point in the history
  • Loading branch information
aline-borges committed Nov 19, 2020
1 parent 7f84c2b commit 61476f6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
Binary file added assets/images/weather/background/day/sand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/weather/background/day/smoke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/weather/background/night/mist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/weather/background/night/smoke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions src/screens/Location/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ const Location = ({ route, navigation }) => {
if(weather === 'Thunderstorm') {return 'Tempestade'}
if(weather === 'Snow') {return 'Neve'}
if(weather === 'Fog') {return 'Nevoeiro'}
if(weather === 'Squall') {return 'Rajadas de Vento'}
if(weather === 'Tornado') {return 'Tornado'}
if(weather === 'Drizzle') {return 'Chuvisco'}
if(weather === 'Smoke') {return 'Fumaça'}
if(weather === 'Haze') {return 'Tempo Seco'}
if(weather === 'Dust') {return 'Tempestade de Poeira'}
if(weather === 'Sand') {return 'Tempestade de Areia'}
if(weather === 'Ash') {return 'Cinzas Vulcânicas'}
if(weather === 'Mist') {return 'Nebuloso'}
console.log(weather)
}

Expand All @@ -87,21 +96,20 @@ const Location = ({ route, navigation }) => {

if((time >= 6) && (time <= 17)){
if(weather === 'Clear') {return background = require('../../../assets/images/weather/background/day/default.png')}
if(weather === 'Clouds') {return background = require('../../../assets/images/weather/background/day/cloudy.png')}
if(weather === 'Rain') {return background = require('../../../assets/images/weather/background/day/rain.png')}
if((weather === 'Clouds') || (weather === 'Mist')) {return background = require('../../../assets/images/weather/background/day/cloudy.png')}
if((weather === 'Rain') || (weather === 'Drizzle')) {return background = require('../../../assets/images/weather/background/day/rain.png')}
if(weather === 'Thunderstorm') {return background = require('../../../assets/images/weather/background/day/thunder.png')}
if(weather === 'Snow') {return background = require('../../../assets/images/weather/background/day/snowfall.png')}
if(weather === 'Fog') {return background = require('../../../assets/images/weather/background/day/fog.png')}
}

if((time >= 18) || (time <= 5)){
if(weather === 'Clear') {return background = require('../../../assets/images/weather/background/night/default.png')}
if(weather === 'Clouds') { return background = require('../../../assets/images/weather/background/night/cloudy.png')}
if(weather === 'Rain') {return background = require('../../../assets/images/weather/background/night/rain.png')}
if((weather === 'Clouds') || (weather === 'Mist')) { return background = require('../../../assets/images/weather/background/night/cloudy.png')}
if((weather === 'Rain') || (weather === 'Drizzle')) {return background = require('../../../assets/images/weather/background/night/rain.png')}
if(weather === 'Thunderstorm') {return background = require('../../../assets/images/weather/background/night/thunder.png')}
if(weather === 'Snow') {return background = require('../../../assets/images/weather/background/night/snowfall.png')}
if(weather === 'Fog') {return background = require('../../../assets/images/weather/background/night/fog.png')}

}

}
Expand Down

0 comments on commit 61476f6

Please sign in to comment.