You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
import React, { Component } from 'react'; |
|
import { HashRouter, Route, Switch } from 'react-router-dom'; |
|
import './App.scss'; |
|
import 'react-notifications/lib/notifications.css'; |
|
import { Provider } from 'react-redux'; |
|
import { PersistGate } from 'redux-persist/integration/react'; |
|
import { persistor, store } from './appredux/store'; |
|
import { handleChangeLng } from "../src/utils/LangUtils"; |
|
const loading = () => <div className="animated fadeIn pt-3 text-center">Loading...</div>; |
|
|
|
const DefaultLayout = React.lazy(() => import('./containers/DefaultLayout')); |
|
|
|
const Login = React.lazy(() => import('./views/Pages/Login')); |
|
|
|
const SiopasMap = React.lazy(() => import('./views/Map')); |
|
|
|
class App extends Component { |
|
|
|
render() { |
|
return ( |
|
<Provider store={store}> |
|
<HashRouter> |
|
<React.Suspense fallback={loading()}> |
|
<Switch> |
|
<Route exact path="/login" name="Login Page" render={props => <Login {...props} />} /> |
|
<Route exact path="/map/view" name="Map" render={props => <SiopasMap {...props} />} /> |
|
<Route path="/" name="Home" render={props => <DefaultLayout {...props} />} /> |
|
</Switch> |
|
</React.Suspense> |
|
</HashRouter> |
|
</Provider> |
|
); |
|
} |
|
} |
|
|
|
export default App;
|
|
|