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:
parent
d35889b5dc
commit
f9f04a9f2d
5 changed files with 36 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue