From d86f7b02a41f22cf7ab89e041c47b7c6878cfeb8 Mon Sep 17 00:00:00 2001 From: Mohd Jami Date: Thu, 26 Dec 2024 04:18:32 +0530 Subject: [PATCH] Updated avatar fallback --- components/pages/Profile.tsx | 2 +- components/users/user-account-nav.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/pages/Profile.tsx b/components/pages/Profile.tsx index 1753404..68076f9 100644 --- a/components/pages/Profile.tsx +++ b/components/pages/Profile.tsx @@ -143,7 +143,7 @@ export default function ProfileSettingsPage({ user }: { user: User }) { src={user?.user_metadata?.avatar_url} alt="Profile picture" /> - {user.email?.charAt(0)} + {user?.user_metadata.full_name?.charAt(0) || user.user_metadata.email.charAt(0)} diff --git a/components/users/user-account-nav.tsx b/components/users/user-account-nav.tsx index 90646ca..dce74f8 100644 --- a/components/users/user-account-nav.tsx +++ b/components/users/user-account-nav.tsx @@ -38,7 +38,7 @@ const UserAccountNav = ({ user }: { user: User }) => { /> ) : ( - {user?.user_metadata.full_name?.charAt(0).toUpperCase()} + {user?.user_metadata.full_name?.charAt(0).toUpperCase() || user?.user_metadata.email.charAt(0).toUpperCase()} )}