Skip to content

Commit cd883e7

Browse files
committed
Remove redirect on mount
1 parent 7f1bf4d commit cd883e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web/layouts/default.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export default class DefaultLayout extends Vue {
3737
}
3838
3939
mounted() {
40-
if (this.$route.name !== 'index') {
41-
this.$store.dispatch('setNextRoute', this.$route.path)
42-
this.$router.push({ name: 'index' })
43-
}
40+
// if (this.$route.name !== 'index') {
41+
// this.$store.dispatch('setNextRoute', this.$route.path)
42+
// this.$router.push({ name: 'index' })
43+
// }
4444
}
4545
4646
beforeDestroy(): void {

web/middleware/guest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Context, Middleware } from '@nuxt/types'
22

3-
const authMiddleware: Middleware = (context: Context) => {
3+
const guestMiddleware: Middleware = (context: Context) => {
44
if (context.store.getters.getAuthUser !== null) {
55
if (context.store.getters.getNextRoute) {
66
context.redirect(context.store.getters.getNextRoute)
@@ -10,4 +10,4 @@ const authMiddleware: Middleware = (context: Context) => {
1010
}
1111
}
1212

13-
export default authMiddleware
13+
export default guestMiddleware

0 commit comments

Comments
 (0)