Skip to content

Commit

Permalink
FWF-3939: Sonar issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonymol-aot committed Dec 2, 2024
1 parent 8717c51 commit 04fa0f9
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions forms-flow-nav/src/sidenav/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,20 @@ const Sidebar = React.memo(({ props }) => {
</div>
<div>
<p
className="user-name"
data-testid="user-name"
onClick={handleProfileModal} //profile settings modal for language selection
>
{userDetail?.name}
</p>
className="user-name"
data-testid="user-name"
onClick={handleProfileModal}
tabIndex="0"
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
handleProfileModal();
}
}}
>
{userDetail?.name}
</p>


<OverlayTrigger
placement="top"
overlay={
Expand Down Expand Up @@ -402,7 +410,8 @@ const Sidebar = React.memo(({ props }) => {
Sidebar.propTypes = {
props: PropTypes.shape({
subscribe: PropTypes.func.isRequired,
getKcInstance: PropTypes.func.isRequired,
getKcInstance: PropTypes.func.isRequired,
publish: PropTypes.func.isRequired,
}).isRequired,
};

Expand Down

0 comments on commit 04fa0f9

Please sign in to comment.