mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-10 22:22:14 +00:00
17 lines
414 B
TypeScript
17 lines
414 B
TypeScript
import { Navigation } from '@decky/ui';
|
|
import { AnchorHTMLAttributes, FC } from 'react';
|
|
|
|
const ExternalLink: FC<AnchorHTMLAttributes<HTMLAnchorElement>> = (props) => {
|
|
return (
|
|
<a
|
|
{...props}
|
|
onClick={(e) => {
|
|
e.preventDefault();
|
|
props.onClick ? props.onClick(e) : props.href && Navigation.NavigateToExternalWeb(props.href);
|
|
}}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default ExternalLink;
|