Skip to content

Commit

Permalink
Merge pull request #17 from disha1202/#2p7b92p
Browse files Browse the repository at this point in the history
Fixed: Browser back button should not navigate to Login page after login(#2p7b92p)
  • Loading branch information
adityasharma7 authored Aug 10, 2022
2 parents abd8be6 + 8d676db commit 909084a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const loginGuard = (to: any, from: any, next: any) => {
if (!store.getters['user/isAuthenticated']) {
next()
} else {
next("/")
next("/order-detail")
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineComponent({
this.username = ''
this.password = ''
this.store.dispatch('order/getDraftOrder', this.routeParams.id);
this.$router.push('/order-detail');
this.$router.replace('/order-detail');
}
})
}
Expand Down

0 comments on commit 909084a

Please sign in to comment.