Skip to content

Commit

Permalink
fix: The navItems are not clickable with vimium (accessibility) (#12813)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Fresco <[email protected]>
  • Loading branch information
michaelfresco committed Nov 6, 2024
1 parent 54f36c7 commit c7f0e2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/nav-bar/nav-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {default as classNames} from 'classnames';
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { Link } from 'react-router-dom'; // Import Link from react-router-dom

import { AppContext } from '../../context';
import {Tooltip} from '../tooltip/tooltip';
Expand Down Expand Up @@ -35,10 +36,12 @@ export const NavBar: React.FunctionComponent<NavBarProps> = (props: NavBarProps,
<div className='nav-bar__version'>{props.version && props.version()}</div>
{(props.items || []).map((item) => (
<Tooltip content={item.title} placement='right' arrow={true} key={item.path + item.title}>
<a href="#">
<div className={classNames('nav-bar__item', { active: isActiveRoute(locationPath, item.path) })}
onClick={() => context.router.history.push(item.path)}>
<i className={item.iconClassName}/>
</div>
</a>
</Tooltip>
))}
</div>
Expand Down

0 comments on commit c7f0e2f

Please sign in to comment.