mirror of https://github.com/embarklabs/embark.git
feat(containers/AppContainers): make use of new LoginLayout
This commit is contained in:
parent
c1b9760502
commit
0baf0526b1
|
@ -5,6 +5,7 @@ import {withRouter} from "react-router-dom";
|
||||||
import routes from '../routes';
|
import routes from '../routes';
|
||||||
import Unauthenticated from '../components/Unauthenticated';
|
import Unauthenticated from '../components/Unauthenticated';
|
||||||
import Layout from "../components/Layout";
|
import Layout from "../components/Layout";
|
||||||
|
import LoginLayout from '../components/LoginLayout';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
authenticate, fetchCredentials, logout,
|
authenticate, fetchCredentials, logout,
|
||||||
|
@ -62,12 +63,18 @@ class AppContainer extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Layout location ={this.props.location} logout={this.props.logout} credentials={this.props.credentials}>
|
<React.Fragment>
|
||||||
{this.shouldRenderUnauthenticated() ? <Unauthenticated credentials={this.props.credentials}
|
{this.shouldRenderUnauthenticated() ?
|
||||||
authenticate={this.props.authenticate}
|
<LoginLayout>
|
||||||
error={this.props.authenticationError} /> : <React.Fragment>{routes}</React.Fragment>}
|
<Unauthenticated credentials={this.props.credentials} authenticate={this.props.authenticate} error={this.props.authenticationError} />
|
||||||
</Layout>
|
</LoginLayout>
|
||||||
);
|
:
|
||||||
|
<Layout location={this.props.location} logout={this.props.logout} credentials={this.props.credentials}>
|
||||||
|
<React.Fragment>{routes}</React.Fragment>
|
||||||
|
</Layout>
|
||||||
|
}
|
||||||
|
</React.Fragment>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue