Skip to content

Commit

Permalink
Merge pull request #199 from M0nica/temperature-patch
Browse files Browse the repository at this point in the history
round temperature to nearest whole number
  • Loading branch information
M0nica authored May 25, 2018
2 parents 6adb7fb + a9ae878 commit 9b2e3bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class HeaderContainer extends Component {
});

getWeather(latitude, longitude).then((weather) => {
weather = Math.round(weather);
this.setState({currentWeather: weather})
}).catch(function(err){
console.log('Error retrieving the current weather: ', err);
Expand Down Expand Up @@ -102,4 +103,6 @@ export default GoogleApiWrapper({
apiKey: (process.env.REACT_APP_GKEY),
libraries: ['places'],
version: '3'
})(HeaderContainer)

})(HeaderContainer)

0 comments on commit 9b2e3bd

Please sign in to comment.