Parcourir la source

🐛 fix(layout): 修复用户头像显示路径错误

- 更正用户头像图片路径,从user?.avatar改为user?.avatarFile.fullUrl以正确获取头像地址
yourname il y a 4 mois
Parent
commit
88f0e32f38
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/client/admin-shadcn/layouts/MainLayout.tsx

+ 1 - 1
src/client/admin-shadcn/layouts/MainLayout.tsx

@@ -197,7 +197,7 @@ export const MainLayout = () => {
                 <Button variant="ghost" className="relative h-8 w-8 rounded-full">
                   <Avatar className="h-8 w-8">
                     <AvatarImage
-                      src={user?.avatar || 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?q=80&w=40&auto=format&fit=crop'}
+                      src={user?.avatarFile?.fullUrl || 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?q=80&w=40&auto=format&fit=crop'}
                       alt={user?.username || 'User'}
                     />
                     <AvatarFallback>