Skip to content

Commit

Permalink
feat: add display name to user
Browse files Browse the repository at this point in the history
  • Loading branch information
paring-chan committed Apr 3, 2024
1 parent ddd8980 commit f10fabd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/nav/NavSignArea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{#if user}
<div class="nav-user-area">
<Avatar size={24} src={user.avatarURL} />
<div class="username">{user.username}</div>
<div class="username">{user.displayName || user.username}</div>
</div>
{:else}
<div class="nav-sign-area">
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface User {
id: string
username: string
displayName: string | null
avatarURL: string | null
isAdmin: boolean
}

0 comments on commit f10fabd

Please sign in to comment.