mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-29 01:39:36 +02:00
Add user name to Navbar component
This commit is contained in:
parent
f335917047
commit
3ab2918ed2
2 changed files with 6 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
import { visitCount } from "$lib/utils/stores/visitCountStore";
|
||||
import { goto } from "$app/navigation";
|
||||
import type { DatabaseUser } from "$lib/server/auth";
|
||||
export let user: any;
|
||||
async function goHome() {
|
||||
goto("/");
|
||||
}
|
||||
|
@ -47,5 +48,8 @@
|
|||
</div>
|
||||
<div class="navbar-end flex justify-around md:justify-end mr-4">
|
||||
<p>Adventures: {count}</p>
|
||||
{#if user}
|
||||
<p>Hello {user.first_name}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue