diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-09-26 14:56:02 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-09-26 14:56:02 +0200 |
| commit | a17b76ac75f506f5da6fe8adf9c36632b60d4226 (patch) | |
| tree | abb0af0c4409b830dea2ef808c146223ee973933 /frontend/site/app.js | |
| parent | 2231a6e1c05b07bb7ec5906716aedec93d02429c (diff) | |
refactor to use app-rooted js imports
Diffstat (limited to 'frontend/site/app.js')
| -rw-r--r-- | frontend/site/app.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/frontend/site/app.js b/frontend/site/app.js deleted file mode 100644 index cf52460..0000000 --- a/frontend/site/app.js +++ /dev/null @@ -1,33 +0,0 @@ -import React, { Component } from 'react' -import { ConnectedRouter } from 'connected-react-router' -import { Route } from 'react-router' - -import ViewerContainer from './viewer/viewer.container' -import actions from './actions' - -export default class App extends Component { - componentDidMount() { - const path_partz = window.location.pathname.split('/') - const graph_name = path_partz[1] - let path_name = null - if (path_partz.length > 2) { - path_name = path_partz[2] - } - // console.log('loading', graph_name, path_name) - actions.site.loadSite(graph_name, path_name) - } - - render() { - return ( - <ConnectedRouter history={this.props.history}> - <div className='app'> - <Route path={'/:graph_name/:page_name'} component={ViewerContainer} exact /> - <Route exact key='root' path='/' render={() => { - // setTimeout(() => this.props.history.push('/'), 10) - return null - }} /> - </div> - </ConnectedRouter> - ) - } -} |
