mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
add restentpoint for login/logout, restructuring of modules and components, add flow usage
This commit is contained in:
35
scm-ui/src/containers/App.js
Normal file
35
scm-ui/src/containers/App.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import React, { Component } from "react";
|
||||
import Navigation from "./Navigation";
|
||||
import Main from "./Main";
|
||||
import Login from "./Login";
|
||||
import { withRouter } from "react-router-dom";
|
||||
|
||||
type Props = {
|
||||
login: boolean
|
||||
}
|
||||
|
||||
class App extends Component {
|
||||
|
||||
render() {
|
||||
|
||||
const { login} = this.props;
|
||||
|
||||
if(login) {
|
||||
return (
|
||||
<div>
|
||||
<Login/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else {
|
||||
return (
|
||||
<div className="App">
|
||||
<Navigation />
|
||||
<Main />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default withRouter(App);
|
||||
Reference in New Issue
Block a user