Added logout button
This commit is contained in:
parent
8ccb1893f1
commit
0349a4ad4a
1 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div>
|
||||
<h3>Hiiiii</h3>
|
||||
<span v-if="authenticated">Logged in</span>
|
||||
<span v-if="authenticated">Logged in
|
||||
<button v-on:click="logout()" class="button">Logout</button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -22,6 +24,11 @@
|
|||
router.push({name: 'login'})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
logout () {
|
||||
auth.logout()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue