Skip to content

Commit

Permalink
Merge pull request #4 from mohdjami/development
Browse files Browse the repository at this point in the history
Updated avatar fallback
  • Loading branch information
mohdjami authored Dec 25, 2024
2 parents 04947af + d86f7b0 commit 48d3a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function ProfileSettingsPage({ user }: { user: User }) {
src={user?.user_metadata?.avatar_url}
alt="Profile picture"
/>
<AvatarFallback>{user.email?.charAt(0)}</AvatarFallback>
<AvatarFallback>{user?.user_metadata.full_name?.charAt(0) || user.user_metadata.email.charAt(0)}</AvatarFallback>
</Avatar>
<Button variant="outline">Change Avatar</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/users/user-account-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const UserAccountNav = ({ user }: { user: User }) => {
/>
) : (
<AvatarFallback>
{user?.user_metadata.full_name?.charAt(0).toUpperCase()}
{user?.user_metadata.full_name?.charAt(0).toUpperCase() || user?.user_metadata.email.charAt(0).toUpperCase()}
</AvatarFallback>
)}
</Avatar>
Expand Down

0 comments on commit 48d3a38

Please sign in to comment.