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>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h3>Hiiiii</h3>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -22,6 +24,11 @@
|
||||||
router.push({name: 'login'})
|
router.push({name: 'login'})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
logout () {
|
||||||
|
auth.logout()
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue