mirror of
https://github.com/Raghu-Ch/ReactWeather.git
synced 2026-02-10 11:03:02 -05:00
add styles to weather page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user