This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Make non-link ColumnLinks behave as links
closed-social-glitch-2
Thibaut Girka
5 years ago
committed by
ThibG
parent
f4d28ccfa3
commit
0c091475df
1 changed files
with
6 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-1
app/javascript/flavours/glitch/features/ui/components/column_link.js
+ 6
- 1
app/javascript/flavours/glitch/features/ui/components/column_link.js
View File
@ -22,8 +22,13 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
<
/
L
i
n
k
>
)
;
}
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
}
Write
Preview
Loading…
Cancel
Save