Daniel Supernault 6 лет назад
Родитель
Сommit
e9c8646137
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      resources/assets/js/components/PostComponent.vue

+ 4 - 2
resources/assets/js/components/PostComponent.vue

@@ -728,8 +728,10 @@ export default {
               type: 'status',
               item: this.status.id
             }).then(res => {
-              swal('Success', 'You have successfully deleted this post', 'success');
-              window.location.href = '/';
+              setTimeout(function() {
+                swal('Success', 'You have successfully deleted this post', 'success');
+                window.location.href = '/';
+              }, 2000);
             }).catch(err => {
               swal('Error', 'Something went wrong. Please try again later.', 'error');
             });