summaryrefslogtreecommitdiff
path: root/frontend/views/graph/graph.container.js
diff options
context:
space:
mode:
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,
})