Created
November 10, 2017 01:36
-
-
Save dantenovski/2dd053c346ab91e94de24139d9bde392 to your computer and use it in GitHub Desktop.
This file contains 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
import React, { Component } from 'react'; | |
import { Link, withRouter } from 'react-router-dom'; | |
import '../../build/assets/css/style.css'; | |
const HandleLogin = withRouter(({ history }) => ( | |
<button onClick={() => { | |
history.push('/') | |
}}>Sign out</button> | |
)) | |
class RegisterLogin extends Component { | |
constructor(props){ | |
super(props); | |
.... | |
.... | |
render(){ | |
... | |
<div className="submit-responses"> | |
{ this.props.submitResponses.login == 'post success' ? | |
(withRouter(({ history }) => ( history.push('/'))))() : | |
'' } | |
</div> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment