Skip to content

Commit 2c020ff

Browse files
committed
Add delay before redirecting after sending SMS
1 parent f89d915 commit 2c020ff

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

web/pages/bulk-messages/index.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,17 @@ export default Vue.extend({
153153
this.$store
154154
.dispatch('sendBulkMessages', this.formFile)
155155
.then(() => {
156-
this.$router.push({ name: 'threads' })
156+
setTimeout(() => {
157+
this.loading = false
158+
this.$router.push({ name: 'threads' })
159+
}, 2000)
157160
})
158161
.catch((error: AxiosError) => {
159162
this.errorTitle = capitalize(
160163
error.response?.data?.message ??
161164
'Error while sending bulk messages',
162165
)
163166
this.errorMessages = getErrorMessages(error)
164-
})
165-
.finally(() => {
166167
this.loading = false
167168
})
168169
},

0 commit comments

Comments
 (0)