From e01b0daaf3261c85b8932a4135f23f0d4c2775e2 Mon Sep 17 00:00:00 2001 From: chenhang Date: Thu, 25 Jun 2026 17:29:49 +0800 Subject: [PATCH] fix(user): prefer stored avatar in account surfaces --- src/app/sidebar/sidebar-screen.tsx | 2 +- src/app/subscription/subscription-screen.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/sidebar/sidebar-screen.tsx b/src/app/sidebar/sidebar-screen.tsx index 890efbcb..103a3c0f 100644 --- a/src/app/sidebar/sidebar-screen.tsx +++ b/src/app/sidebar/sidebar-screen.tsx @@ -55,7 +55,7 @@ export function SidebarScreen() { sidebarState !== "guest" && user.currentUser == null; const name = user.currentUser?.username ?? FALLBACK_USERNAME; - const avatarUrl = user.currentUser?.avatarUrl ?? null; + const avatarUrl = user.avatarUrl ?? user.currentUser?.avatarUrl ?? null; return ( diff --git a/src/app/subscription/subscription-screen.tsx b/src/app/subscription/subscription-screen.tsx index 7e7f36c6..17c27b12 100644 --- a/src/app/subscription/subscription-screen.tsx +++ b/src/app/subscription/subscription-screen.tsx @@ -200,7 +200,7 @@ export function SubscriptionScreen({ selectedPlan !== null && payment.agreed && !isPaymentBusy; const name = user.currentUser?.username ?? FALLBACK_USERNAME; - const avatarUrl = user.currentUser?.avatarUrl ?? null; + const avatarUrl = user.avatarUrl ?? user.currentUser?.avatarUrl ?? null; const autoRenewCaption = payment.autoRenew ? "It will automatically renew upon expiration, and can be canceled at any time" : "This plan is a one-time purchase and will not automatically renew";