From 647097fa29cf739239192168f8c2b146ede5e87c Mon Sep 17 00:00:00 2001 From: Bram Wiepjes <bramw@protonmail.com> Date: Mon, 26 Aug 2019 19:10:25 +0000 Subject: [PATCH] fixed bug where content of the previous page would show after refresh --- web-frontend/layouts/app.vue | 3 +-- web-frontend/pages/login/index.vue | 2 +- web-frontend/pages/login/signup.vue | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web-frontend/layouts/app.vue b/web-frontend/layouts/app.vue index b6593b1f7..808956f51 100644 --- a/web-frontend/layouts/app.vue +++ b/web-frontend/layouts/app.vue @@ -80,7 +80,6 @@ import Notifications from '@/components/notifications/Notifications' import GroupsContext from '@/components/group/GroupsContext' export default { - layout: 'default', middleware: 'authenticated', components: { GroupsContext, @@ -96,7 +95,7 @@ export default { methods: { logoff() { this.$store.dispatch('auth/logoff') - this.$nuxt.$router.replace({ name: 'login' }) + this.$nuxt.$router.push({ name: 'login' }) }, ...mapActions({ toggleCollapsed: 'sidebar/toggleCollapsed' diff --git a/web-frontend/pages/login/index.vue b/web-frontend/pages/login/index.vue index 73403b6be..3b6bacf7e 100644 --- a/web-frontend/pages/login/index.vue +++ b/web-frontend/pages/login/index.vue @@ -103,7 +103,7 @@ export default { password: this.credentials.password }) .then(() => { - this.$nuxt.$router.replace({ name: 'app' }) + this.$nuxt.$router.push({ name: 'app' }) }) .catch(error => { // If the status code is 400 the provided email or password is incorrect. diff --git a/web-frontend/pages/login/signup.vue b/web-frontend/pages/login/signup.vue index 2774114fb..dc058559d 100644 --- a/web-frontend/pages/login/signup.vue +++ b/web-frontend/pages/login/signup.vue @@ -144,7 +144,7 @@ export default { password: this.account.password }) .then(() => { - this.$nuxt.$router.replace({ name: 'app' }) + this.$nuxt.$router.push({ name: 'app' }) }) .catch(error => { this.error = error.responseError