Greet user #21

Merged
BenjaminPalko merged 4 commits from greet-user into master 2024-12-19 22:24:44 -05:00
2 changed files with 9 additions and 5 deletions
Showing only changes of commit b8658c9d27 - Show all commits

View file

@ -20,5 +20,7 @@ export async function load(event) {
}
const { password: _, ...rest } = session.user;
return rest;
return {
user: rest,
};
}

View file

@ -5,11 +5,13 @@
type Props = {
children: Snippet;
data: Omit<User, 'password'>;
data: {
user: Omit<User, 'password'>;
};
};
let { children, data }: Props = $props();
</script>
<Navbar title="Svelte" username={data.name} />
<Navbar title="Svelte" username={data.user.name} />
{@render children()}