Skip to content

Commit

Permalink
Update ProfileDropdown.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
khushipatil1523 authored Jan 23, 2025
1 parent 2fbfc44 commit 9480d76
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/ProfileDropdown/ProfileDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,17 @@ const profileDropdown = (): JSX.Element => {
</div>
<div
className={styles.profileTextTitle}
data-testid="profileBtn"
role="button"
+ tabIndex={0}
aria-label="View Profile"
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ userRole === 'User'
+ ? navigate(`/user/settings`)
+ : navigate(`/member/${orgId || ''}`);
+ }
+ }}
data-testid="profileBtn"
onClick={() =>
userRole === 'User'
? navigate(`/user/settings`)
Expand Down

0 comments on commit 9480d76

Please sign in to comment.