diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-14 19:56:33 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-14 19:56:33 +0200 |
| commit | ff134ba1809fe3f96b806051ac6f4afb52c4304e (patch) | |
| tree | d50778ab72825d0bd6eeccd769b211a46fba87b1 /frontend/views/page/components/tile.form.js | |
| parent | eb5136e2023fb0999995befff60624d5d4c51c94 (diff) | |
properly sorting and deleting tiles
Diffstat (limited to 'frontend/views/page/components/tile.form.js')
| -rw-r--r-- | frontend/views/page/components/tile.form.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/views/page/components/tile.form.js b/frontend/views/page/components/tile.form.js index 8d26173..dd8da96 100644 --- a/frontend/views/page/components/tile.form.js +++ b/frontend/views/page/components/tile.form.js @@ -3,6 +3,7 @@ import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { Link } from 'react-router-dom' +import actions from '../../../actions' import { session } from '../../../session' import { @@ -288,10 +289,12 @@ class TileForm extends Component { } handleDelete() { - const { temporaryTile, isNew } = this.props - const tile_id = temporaryTile.id + const { temporaryTile, isNew, onClose } = this.props if (confirm('Really delete this tile?')) { - actions.tile.delete(temporaryTile.id) + actions.tile.destroy(temporaryTile) + .then(() => { + onClose() + }) } } |
