Skip to content

Commit

Permalink
Login component redirect prop
Browse files Browse the repository at this point in the history
  • Loading branch information
royduin committed Jan 12, 2022
1 parent 3dfef56 commit 71617ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions resources/js/components/Checkout/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
checkoutLogin: {
type: Boolean,
default: true,
},
redirect: {
type: String,
default: '/account'
}
},
Expand Down Expand Up @@ -88,8 +92,8 @@
successfulLogin() {
if (this.checkoutLogin) {
this.$root.checkout.step = 2
} else {
Turbolinks.visit('/account')
} else if (this.redirect) {
Turbolinks.visit(this.redirect)
}
}
},
Expand Down

0 comments on commit 71617ae

Please sign in to comment.