From 19ff59147a3f47eb4e3ef911f5d43c22ad4d2446 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 23 Jun 2020 17:20:21 +0200 Subject: [PATCH] Fix redirection after event deletion Signed-off-by: Thomas Citharel --- js/src/mixins/event.ts | 1 - js/src/views/Event/Event.vue | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/mixins/event.ts b/js/src/mixins/event.ts index 7ef38d275..b571579ab 100644 --- a/js/src/mixins/event.ts +++ b/js/src/mixins/event.ts @@ -142,7 +142,6 @@ export default class EventMixin extends mixins(Vue) { position: "is-bottom-right", duration: 5000, }); - await this.$router.push({ name: RouteName.HOME }); } catch (error) { console.error(error); } diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 56b1e9698..68d684cc5 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -755,6 +755,10 @@ export default class Event extends EventMixin { } }); }); + + this.$on('eventDeleted', () => { + return this.$router.push({ name: RouteName.HOME }); + }) } /**