diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index cd18995..4343618 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -4,6 +4,7 @@ import { goto } from "$app/navigation"; import type { DatabaseUser } from "$lib/server/auth"; export let user: any; + import UserAvatar from "./UserAvatar.svelte"; async function goHome() { goto("/"); } @@ -16,6 +17,9 @@ async function toToLogin() { goto("/login"); } + async function toToSignup() { + goto("/signup"); + } let count = 0; visitCount.subscribe((value) => { @@ -54,8 +58,10 @@

Adventures: {count}

{#if !user} + {/if} {#if user} +
diff --git a/src/lib/components/UserAvatar.svelte b/src/lib/components/UserAvatar.svelte new file mode 100644 index 0000000..f1b983d --- /dev/null +++ b/src/lib/components/UserAvatar.svelte @@ -0,0 +1,10 @@ + + +
+
+ {firstLetter} +
+
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 04d4fa2..497dd31 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -31,9 +31,3 @@ - -{#if data.user} -
- -
-{/if}