mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 17:53:41 +01:00
Make non-link ColumnLinks behave as links
This commit is contained in:
parent
f4d28ccfa3
commit
0c091475df
1 changed files with 6 additions and 1 deletions
|
@ -22,8 +22,13 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
|
|||
</Link>
|
||||
);
|
||||
} else {
|
||||
const handleOnClick = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return onClick(e);
|
||||
}
|
||||
return (
|
||||
<a onClick={onClick} className='column-link' role='button' tabIndex='0' data-method={method}>
|
||||
<a href='#' onClick={onClick && handleOnClick} className='column-link' tabIndex='0'>
|
||||
<i className={`fa fa-fw fa-${icon} column-link__icon`} />
|
||||
{text}
|
||||
{badgeElement}
|
||||
|
|
Loading…
Reference in a new issue