Last active
May 25, 2018 19:37
-
-
Save maisonm/682a58152fe5a0cb18bfa03ab2fddc41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WeatherCardError = ( | |
<div className='weatherCardContainer'> | |
<div className='weatherCardError'> | |
<img src={NoLocationFound} alt='no location found'/> | |
<p> Whoa! Looks like there was an error with your zipcode.</p> | |
<Link to='/'><button>Try Again</button></Link> | |
</div> | |
</div> | |
) | |
const WeatherConditions = ( | |
this.state.cityNotFound == 404 ? <div> { WeatherCardError } </div> : | |
<div> | |
<div className='homeBtn'> | |
<Link to='/'><button>Home</button></Link> | |
</div> | |
<div className='weatherCardContainer'> | |
<div className='weatherCard'> | |
<img src={this.state.weatherIcon} alt='Weather icon'/> | |
<div className='conditionsOverview'> | |
<p>{this.state.currentTemp}</p> | |
<p>{this.state.currentConditionDescription}</p> | |
</div> | |
<div className='conditionDetails'> | |
<p>Humidity: {this.state.humidity} </p> | |
<p>Wind Speed: {this.state.wind} </p> | |
</div> | |
</div> | |
<h4> Location | {this.state.cityName} </h4> | |
</div> | |
</div> | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment