diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-11-12 19:03:31 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-11-12 19:03:31 +0100 |
| commit | e9a5a0eb4b122ab83fd48f7a0f34cd56ee63bd7e (patch) | |
| tree | 4c67d72ec4979c0afcffd651e7b8732dd4c6b91f /animism-align/frontend/site/app.js | |
| parent | d5924e554701a5d7cdee52c7fd264a164e880a84 (diff) | |
stub in site frontend spot
Diffstat (limited to 'animism-align/frontend/site/app.js')
| -rw-r--r-- | animism-align/frontend/site/app.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/animism-align/frontend/site/app.js b/animism-align/frontend/site/app.js new file mode 100644 index 0000000..4f8a6cf --- /dev/null +++ b/animism-align/frontend/site/app.js @@ -0,0 +1,35 @@ +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 exact key='root' path='/' render={() => { + // setTimeout(() => this.props.history.push('/'), 10) + return null + }} /> + </div> + </ConnectedRouter> + ) + } +} +/* + <Route path={'/:graph_name/:page_name'} component={ViewerContainer} exact /> +*/ |
