Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 18d0975

Browse files
committed
fix: navbar visibility
navbar is not rendered if first name/last name is missing. this patch fixes this by not showing letters in avatar for user with a missing first name/last name
1 parent fdf1368 commit 18d0975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Avatar/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const Avatar = ({ profile }) => (
1212
<img src={profile.photoURL} alt="User avatar" className="avatar-photo" />
1313
) : (
1414
<span className="avatar-letters">
15-
{profile.firstName.charAt(0)}
16-
{profile.lastName.charAt(0)}
15+
{profile.firstName?.charAt(0)}
16+
{profile.lastName?.charAt(0)}
1717
</span>
1818
)}
1919
</div>

0 commit comments

Comments
 (0)