Skip to content

Commit

Permalink
[hexlet-rus#530]: Fixed lint and prettier errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi-Messaadi committed Jul 25, 2024
1 parent 69c3510 commit 61269eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Avatar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ function Avatar({ username }) {
fontWeight: 300,
pointerEvents: 'none',
}}
textAnchor="middle"
x="50%"
y="52%"
textAnchor="middle"
>
{username}
</text>
Expand Down
13 changes: 5 additions & 8 deletions frontend/src/components/Navigation/UserMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ function UserMenu() {
imageExists(url).then((exists) => setGithubExists(exists));
}, [username]);

//This function takes the first letter of the username and converts it to uppercase
// This function takes the first letter of the username and converts it to uppercase
const capitalizeFirstLetter = (string) => {
return string.charAt(0).toUpperCase();
}
};

return (
<Dropdown align="end" as="li" title="User Menu">
Expand All @@ -68,12 +68,9 @@ function UserMenu() {
borderRadius: '50%',
}}
/>
)
: (
<Avatar username={capitalizeFirstLetter(username)} />
)}


) : (
<Avatar username={capitalizeFirstLetter(username)} />
)}
</div>
<span className="visually-hidden">{tPA('header')}</span>
</Dropdown.Toggle>
Expand Down

0 comments on commit 61269eb

Please sign in to comment.