implemented user login.
next: find a solution for routing
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
import { user } from '../user.svelte.js';
|
||||
|
||||
function logout(){
|
||||
user.username = null;
|
||||
user.name = null;
|
||||
}
|
||||
</script>
|
||||
<nav>
|
||||
<a href="/">{t('nav.Home')}</a>
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('nav.Tutorial')}</a>
|
||||
{#if user.name }
|
||||
<a href="#" on:click={logout}>Logout</a>
|
||||
{/if}
|
||||
</nav>
|
||||
Reference in New Issue
Block a user