<template>
	<header>
		<b-navbar type="dark" variant="dark">
			<b-navbar-nav class="ml-auto">
				<b-nav-item-dropdown :text="user && user.username" right>
					<b-dropdown-item href="/login">Logout</b-dropdown-item>
				</b-nav-item-dropdown>

			</b-navbar-nav>
		</b-navbar>
	</header>
</template>
<script>
	export default {
		data() {
			return {
				user:null
			}
		},
		created() {
			this.user = JSON.parse(window.localStorage.getItem('user'));
		},
	}
</script>
