1
0
Fork 0
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:
Sean Morley 2024-04-05 22:17:20 +00:00
parent f335917047
commit 3ab2918ed2
2 changed files with 6 additions and 2 deletions

View file

@ -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>