close modal faster

This commit is contained in:
DavidWells 2018-06-20 20:31:39 -07:00
parent 56590ba57a
commit 41f5090e2c

View file

@ -186,9 +186,12 @@ export default class App extends Component {
this.setState({
todos: data.optimisticState
}, () => {
setTimeout(() => {
this.closeModal()
}, 600)
api.batchDelete(data.completedTodoIds).then(() => {
console.log(`Batch removal complete`, data.completedTodoIds)
this.closeModal()
}).catch((e) => {
console.log('An API error occurred', e)
})