summaryrefslogtreecommitdiff
path: root/frontend/views/graph/graph.container.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-02 20:25:23 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-02 20:25:23 +0200
commit04f7efe6c05153cbd1613e7b0c78b3b6478ae39b (patch)
treee181c4415a271a60e505fc536219eb5e72b6f6fb /frontend/views/graph/graph.container.js
parentf6d7fcbb50ef57f1f7d7ca8cacd711ffd576e600 (diff)
new page form
Diffstat (limited to 'frontend/views/graph/graph.container.js')
-rw-r--r--frontend/views/graph/graph.container.js28
1 files changed, 21 insertions, 7 deletions
diff --git a/frontend/views/graph/graph.container.js b/frontend/views/graph/graph.container.js
index 40e2e6a..5646d71 100644
--- a/frontend/views/graph/graph.container.js
+++ b/frontend/views/graph/graph.container.js
@@ -10,7 +10,11 @@ import { Loader } from '../../common'
// import * as uploadActions from './upload.actions'
-// import GraphIndex from './containers/graph.index'
+import PageNew from './components/page.new'
+import PageEdit from './components/page.edit'
+
+import GraphHeader from './components/graph.header'
+import GraphEditor from './components/graph.editor'
class GraphContainer extends Component {
componentDidMount() {
@@ -39,22 +43,32 @@ class GraphContainer extends Component {
}
render() {
if (!this.shouldShowGraph()) return null
- if (this.props.graph.show.loading) {
+ if (!this.props.graph.show.res || this.props.graph.show.loading) {
return (
- <div className='index'>
- <Loader />
+ <div>
+ <GraphHeader />
+ <div className='body'>
+ <div className='graph loading'>
+ <Loader />
+ </div>
+ </div>
</div>
)
}
- console.log(this.props.graph.show)
return (
- <div className='index'>
+ <div>
+ <GraphHeader />
+ <div className='body'>
+ <GraphEditor />
+ {this.props.graph.editor.addingPage && <PageNew />}
+ {this.props.graph.editor.editingPage && <PageEdit />}
+ </div>
</div>
)
}
}
- // <Route exact path='/:graph_name' component={GraphView} />
+// <Route exact path='/:graph_name' component={GraphView} />
const mapStateToProps = state => ({
graph: state.graph,
})