only output notification HTML if there is one

This commit is contained in:
Danny van Kooten 2018-05-02 17:10:59 +02:00
parent 68d52a15f7
commit c47fc3d893
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class LoginForm extends Component {
this.setState({ email: e.target.value }); this.setState({ email: e.target.value });
} }
render() { render(props, state) {
return ( return (
<div class="block"> <div class="block">
<h2>Login</h2> <h2>Login</h2>
@ -65,7 +65,7 @@ class LoginForm extends Component {
<input type="submit" value="Sign in" /> <input type="submit" value="Sign in" />
</div> </div>
</form> </form>
<Notification message={this.state.message} kind="" /> {(state.message ? <Notification message={state.message} kind="" /> : '')}
</div> </div>
) )