Skip to content

Commit

Permalink
Add delay before redirecting after sending SMS
Browse files Browse the repository at this point in the history
  • Loading branch information
AchoArnold committed Oct 2, 2023
1 parent f89d915 commit 2c020ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/pages/bulk-messages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,17 @@ export default Vue.extend({
this.$store
.dispatch('sendBulkMessages', this.formFile)
.then(() => {
this.$router.push({ name: 'threads' })
setTimeout(() => {
this.loading = false
this.$router.push({ name: 'threads' })
}, 2000)
})
.catch((error: AxiosError) => {
this.errorTitle = capitalize(
error.response?.data?.message ??
'Error while sending bulk messages',
)
this.errorMessages = getErrorMessages(error)
})
.finally(() => {
this.loading = false
})
},
Expand Down

0 comments on commit 2c020ff

Please sign in to comment.