Show profile avatar in top nav when user has one set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-20 02:21:00 +02:00
parent d35889b5dc
commit f9f04a9f2d
5 changed files with 36 additions and 6 deletions

View file

@ -500,3 +500,14 @@ export async function ensureProfileBundleForCurrentUser(): Promise<ProfileBundle
export async function getProfileBundleForCurrentUser(): Promise<ProfileBundle | null> {
return ensureProfileBundleForCurrentUser();
}
export async function getNavAvatarUrlForCurrentUser(userId: string): Promise<string | null> {
const supabase = await createClient();
const { data } = await supabase
.from("profiles")
.select("avatar_path")
.eq("id", userId)
.maybeSingle();
return getProfileAvatarUrl(data?.avatar_path ?? null);
}