-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.jsx
More file actions
49 lines (43 loc) · 1.32 KB
/
App.jsx
File metadata and controls
49 lines (43 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import { Route, Link, HashRouter } from 'react-router-dom';
import { Button, Container, Divider, Dropdown, Header, Message,
Segment, Menu, Icon, Sidebar, Image } from 'semantic-ui-react';
import Notifications, {notify} from 'react-notify-toast';
// app_modules
import HomePageLayout from './app_modules/Layouts/HomePageLayout.jsx';
import DesktopContainer from './app_modules/Layouts/DesktopContainer.jsx';
import ProspectiveRegister from './app_modules/Access/ProspectiveRegister.jsx';
import config from './config.json';
const App =()=>(
<HashRouter>
<MainContainer></MainContainer>
</HashRouter>
)
class MainContainer extends React.Component{
constructor(props) {
super(props);
this.state = {menuVisible: true};
}
renderMainContent(){
let ruta = window.location.href.split('#');
if (ruta[1] == '/') {
window.location.href = ruta[0] + '#/home';
}else{
return(
<DesktopContainer>
<Route path="/home" component={HomePageLayout}/>
<Route path="/prospectiveCustomerRegister" component={ProspectiveRegister}/>
</DesktopContainer>
)
}
}
render() {
return(
<div>
<Notifications />
{this.renderMainContent()}
</div>
)
}
}
export default App;