Skip to content

Commit

Permalink
clear cart before go back
Browse files Browse the repository at this point in the history
  • Loading branch information
biigpongsatorn committed Jul 21, 2019
1 parent 22ea611 commit 3f560b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/ThankYou.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

<script>
import BigNumber from 'bignumber.js'
import { mapActions } from 'vuex'
export default {
name: 'thankyou',
Expand All @@ -45,8 +46,6 @@ export default {
return parts.join('.')
}
},
components: {
},
created () {
if (this.$route.query && this.$route.query.amountReceived) {
this.amountReceived = this.$route.query.amountReceived
Expand All @@ -63,7 +62,11 @@ export default {
}
},
methods: {
...mapActions({
clearItems: 'clearItems'
}),
back () {
this.clearItems()
this.$router.push({ name: 'Merchant' })
}
}
Expand Down

0 comments on commit 3f560b4

Please sign in to comment.