From 5e07436f0d4ce0b22f37bf7c8c05ac467537a7fa Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Sat, 18 Jul 2020 04:45:58 +0900
Subject: Add logout button

---
 src/site/components/navbar/Navbar.vue | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'src/site/components/navbar/Navbar.vue')

diff --git a/src/site/components/navbar/Navbar.vue b/src/site/components/navbar/Navbar.vue
index 0b98af0..48dfeb1 100644
--- a/src/site/components/navbar/Navbar.vue
+++ b/src/site/components/navbar/Navbar.vue
@@ -45,6 +45,12 @@
 						exact>
 						Account
 					</router-link>
+					<router-link
+						to="/"
+						class="navbar-item no-active"
+						@click.native="logOut">
+						Logout
+					</router-link>
 				</template>
 				<template v-else>
 					<router-link
@@ -79,7 +85,7 @@ export default {
 	},
 	methods: {
 		logOut() {
-			this.$emit('logout');
+			this.$store.dispatch('logout');
 		}
 	}
 };
-- 
cgit v1.2.3

