mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix LinkButton to prevent default
This commit is contained in:
parent
07fe5adc1c
commit
32f835c865
1 changed files with 3 additions and 1 deletions
|
@ -20,6 +20,7 @@ const LinkButton: React.FC<LinkButtonProps> = ({
|
||||||
isAutoHideEnabled,
|
isAutoHideEnabled,
|
||||||
href,
|
href,
|
||||||
target,
|
target,
|
||||||
|
onClick,
|
||||||
children,
|
children,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -41,7 +42,8 @@ const LinkButton: React.FC<LinkButtonProps> = ({
|
||||||
} else {
|
} else {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
}, [ href, target ]);
|
onClick?.(e);
|
||||||
|
}, [ href, target, onClick ]);
|
||||||
|
|
||||||
if (isAutoHideEnabled === true && !appHost.supports('externallinks')) {
|
if (isAutoHideEnabled === true && !appHost.supports('externallinks')) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue