1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Add log out functionality

This commit is contained in:
Andrew Kingston 2020-10-14 20:12:41 +01:00
parent c6cb01c759
commit d026289aa4

View file

@ -16,6 +16,11 @@
}
}
}
const logOut = () => {
localStorage.removeItem("budibase:token")
location.reload()
}
</script>
<div class="nav">
@ -24,12 +29,10 @@
{#if logoUrl}
<img class="logo" alt="logo" src={logoUrl} height="48" />
{/if}
{#if title}
<span>{title}</span>
{/if}
{#if title}<span>{title}</span>{/if}
</a>
<div class="nav__controls">
<div>Log out</div>
<div on:click={logOut}>Log out</div>
</div>
</div>
<div class="nav__menu" bind:this={itemContainer} />