App.js 754 Bytes
import React from 'react';
import { Switch, Route, Redirect } from 'react-router';
import { HashRouter } from 'react-router-dom';

import '../styles/theme.scss';
import LayoutComponent from '../components/Layout/Layout';

class App extends React.PureComponent {
  render() {
    return (
        <div>
            <HashRouter>
                <Switch>
                    <Route path="/" exact render={() => <Redirect to="/app/main"/>}/>
                    <Route path="/app" exact render={() => <Redirect to="/app/main"/>}/>
                    <Route path="/app" component={LayoutComponent}/>
                    <Redirect from="*" to="/app/main/"/>
                </Switch>
            </HashRouter>
        </div>
    );
  }
}

export default App;