Added logout button

This commit is contained in:
kolaente 2018-09-06 20:01:03 +02:00
parent 8ccb1893f1
commit 0349a4ad4a
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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>