Skip to content

Commit

Permalink
Refactor user prop handling in Menu and UserMenu components; add spac…
Browse files Browse the repository at this point in the history
…ing in GitHubHover component
  • Loading branch information
haukened committed Nov 4, 2024
1 parent 022ff19 commit 05356e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/components/custom/GitHubHover.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
}
let dataPromise: Promise<any> = new Promise(() => {});
</script>

<div role="note" on:mouseover|once={() => {dataPromise = loadGitHubData()}} on:focus={() => {}}>
<HoverCard.Root openDelay={50} closeDelay={150}>
<HoverCard.Trigger
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/custom/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Emblem } from "../logos";
import type { UserInfo } from "$lib/types";
export let user: UserInfo | null;
let { user }: { user: UserInfo | null } = $props();
</script>

<div class="container flex flex-row items-center justify-between space-y-2 py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/custom/UserMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { LogOut, User, Users, RectangleEllipsis, Sun, Moon, House } from 'lucide-svelte';
import { toggleMode } from 'mode-watcher';
export let user: UserInfo | null;
let { user }: { user: UserInfo | null } = $props();
</script>

{#if user}
Expand Down

0 comments on commit 05356e8

Please sign in to comment.