add styles to weather page

This commit is contained in:
2017-01-18 00:33:30 -08:00
parent 6714a949dd
commit 30af94b390
4 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ var Weather = React.createClass({
},
handleSearch: function (location) {
var that = this;
this.setState({isLoading: true});
openWeatherMap.getTemp(location).then(function (temp) {
@@ -30,7 +30,7 @@ var Weather = React.createClass({
function renderMessage () {
if (isLoading) {
return <h3>Fetching weather...</h3>;
return <h1>Fetching weather...</h1>;
} else if (temp && location) {
return <WeatherMessage temp={temp} location={location}/>;
}
@@ -38,7 +38,7 @@ var Weather = React.createClass({
return (
<div>
<h3>Weather Component</h3>
<h1 className="text-center">Get Weather</h1>
<WeatherForm onSearch={this.handleSearch}/>
{renderMessage()}
</div>