diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-02 17:38:14 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-02 17:38:14 +0200 |
| commit | f6d7fcbb50ef57f1f7d7ca8cacd711ffd576e600 (patch) | |
| tree | 9d6a4882d428da7098c4244f5ca56267afe8cc1b /frontend/views/index | |
| parent | 5b480258322682fdc4fa987770df9e719315f167 (diff) | |
showing pages for graph. getting urls right
Diffstat (limited to 'frontend/views/index')
| -rw-r--r-- | frontend/views/index/components/graph.form.js | 2 | ||||
| -rw-r--r-- | frontend/views/index/graph.reducer.js | 2 | ||||
| -rw-r--r-- | frontend/views/index/index.container.js | 15 |
3 files changed, 7 insertions, 12 deletions
diff --git a/frontend/views/index/components/graph.form.js b/frontend/views/index/components/graph.form.js index a6a0dd6..50f9773 100644 --- a/frontend/views/index/components/graph.form.js +++ b/frontend/views/index/components/graph.form.js @@ -22,7 +22,7 @@ export default class GraphForm extends Component { componentDidMount() { const { data, isNew } = this.props - const title = isNew ? 'new graph' : 'editing ' + data.title + const title = isNew ? 'new project' : 'editing ' + data.title const submitTitle = isNew ? "Create Graph" : "Save Changes" this.setState({ title, diff --git a/frontend/views/index/graph.reducer.js b/frontend/views/index/graph.reducer.js index 20aed8e..612ac14 100644 --- a/frontend/views/index/graph.reducer.js +++ b/frontend/views/index/graph.reducer.js @@ -11,7 +11,7 @@ const initialState = crudState('graph', { const reducer = crudReducer('graph') export default function graphReducer(state = initialState, action) { - console.log(action.type, action) + // console.log(action.type, action) state = reducer(state, action) switch (action.type) { default: diff --git a/frontend/views/index/index.container.js b/frontend/views/index/index.container.js index 0e7127a..1e2326b 100644 --- a/frontend/views/index/index.container.js +++ b/frontend/views/index/index.container.js @@ -5,7 +5,7 @@ import { connect } from 'react-redux' import './index.css' -// import actions from '../../actions' +import actions from '../../actions' // import * as uploadActions from './upload.actions' import GraphIndex from './containers/graph.index' @@ -13,6 +13,9 @@ import GraphNew from './containers/graph.new' import GraphEdit from './containers/graph.edit' class Container extends Component { + componentDidMount() { + actions.site.setSiteTitle("swimmer") + } render() { return ( <div className='index'> @@ -24,12 +27,4 @@ class Container extends Component { } } -const mapStateToProps = state => ({ - // upload: state.upload, -}) - -const mapDispatchToProps = dispatch => ({ - // uploadActions: bindActionCreators({ ...uploadActions }, dispatch), -}) - -export default connect(mapStateToProps, mapDispatchToProps)(Container) +export default Container |
