summaryrefslogtreecommitdiff
path: root/frontend/views/page/components/tile.new.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/views/page/components/tile.new.js')
-rw-r--r--frontend/views/page/components/tile.new.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/views/page/components/tile.new.js b/frontend/views/page/components/tile.new.js
index 4649904..3c97c31 100644
--- a/frontend/views/page/components/tile.new.js
+++ b/frontend/views/page/components/tile.new.js
@@ -1,10 +1,12 @@
import React, { Component } from 'react'
// import { Link } from 'react-router-dom'
-// import { bindActionCreators } from 'redux'
+import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { history } from '../../../store'
import actions from '../../../actions'
+import * as tileActions from '../../tile/tile.actions'
+import * as pageActions from '../../page/page.actions'
import TileForm from '../components/tile.form'
@@ -18,6 +20,8 @@ class TileNew extends Component {
// if (res.res && res.res.id) {
// history.push('/' + graph.path + '/' + res.res.path)
// }
+ this.props.pageActions.hideAddTileForm()
+ this.props.tileActions.clearTemporaryTile()
})
.catch(err => {
console.error('error')
@@ -43,7 +47,8 @@ const mapStateToProps = state => ({
})
const mapDispatchToProps = dispatch => ({
- // tileActions: bindActionCreators({ ...tileActions }, dispatch),
+ tileActions: bindActionCreators({ ...tileActions }, dispatch),
+ pageActions: bindActionCreators({ ...pageActions }, dispatch),
})
export default connect(mapStateToProps, mapDispatchToProps)(TileNew)