There was an error while loading. Please reload this page.
1 parent d21515c commit 38f11baCopy full SHA for 38f11ba
example/src/components/UserManager.vue
@@ -2,7 +2,7 @@
2
<div :class="$style.container">
3
<div v-if="authenticated">
4
Hi, {{ user.name }} ({{ user.type }})
5
- <button @click.prevent="logout">Log out</button>
+ <button @click.prevent="logMeOut">Log out</button>
6
</div>
7
<div v-else-if="authenticating">
8
Wait...
@@ -55,6 +55,11 @@ export default {
55
},
56
methods: {
57
...mapActions('user', ['logout']),
58
+ logMeOut() {
59
+ return this.logout().then(() => {
60
+ this.username = null
61
+ })
62
+ },
63
authenticate() {
64
if (this.username.trim()) {
65
this.$store
0 commit comments