Skip to content

Commit 955f321

Browse files
authored
feat(ui): show GitHub avatar for authenticated users in header (#96)
1 parent 048192c commit 955f321

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ui/src/components/layout/Header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ function AuthControls({ onNavigate }: { onNavigate?: () => void }) {
8080
<div className="flex items-center gap-2">
8181
{isAdmin && <NavLink to="/admin" onClick={onNavigate}>Admin</NavLink>}
8282
<div className="flex items-center gap-1.5 text-sm text-gray-600 dark:text-gray-300">
83-
<User className="size-4" />
83+
{user.source === 'github' ? (
84+
<img src={`https://github.com/${user.username}.png`} alt="" className="size-6 rounded-full" />
85+
) : (
86+
<User className="size-4" />
87+
)}
8488
<span>{user.username}</span>
8589
{isAdmin && <Shield className="size-3 text-purple-500" />}
8690
</div>

0 commit comments

Comments
 (0)