diff --git a/src/components/SignIn/SignIn.css b/src/components/SignIn/SignIn.css index e38a23ac..b4d25b46 100644 --- a/src/components/SignIn/SignIn.css +++ b/src/components/SignIn/SignIn.css @@ -59,4 +59,16 @@ width: 500px; margin: 0 auto; } +} + +.footer-copyrights { + /* position */ + position: absolute; + bottom: 2em; + left: 0; + right: 0; + + /* font */ + text-align: center; + font-size: 0.8em; } \ No newline at end of file diff --git a/src/components/SignIn/SignIn.jsx b/src/components/SignIn/SignIn.jsx index a501c78b..86c60b2b 100644 --- a/src/components/SignIn/SignIn.jsx +++ b/src/components/SignIn/SignIn.jsx @@ -60,10 +60,8 @@ export class SignIn extends Component { store.set('authToken')(token); this.setState({ loading: false }); - if (location.state && location.state.from) - history.replace(location.state.from); - else - history.push('/dashboard'); + if (location.state && location.state.from) history.replace(location.state.from); + else history.push('/dashboard'); } catch (error) { this.showError('Invalid username or password'); this.setState({ loading: false }); @@ -78,37 +76,26 @@ export class SignIn extends Component { hideError() { this.setState({ error: null }); } + render() { - const { - error, username, password, loading, - } = this.state; + const { error, username, password, loading } = this.state; return (
- Need an account? {' '} + Need an account?{' '} Signup @@ -154,6 +141,10 @@ export class SignIn extends Component {