From d06494885a8932dd01571b40de88eed3a6cd095b Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 1 Sep 2024 20:40:12 -0400 Subject: fix external links softlocking the ui in testing store cta --- frontend/src/components/ExternalLink.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/components/ExternalLink.tsx (limited to 'frontend/src/components/ExternalLink.tsx') diff --git a/frontend/src/components/ExternalLink.tsx b/frontend/src/components/ExternalLink.tsx new file mode 100644 index 00000000..a223fc77 --- /dev/null +++ b/frontend/src/components/ExternalLink.tsx @@ -0,0 +1,16 @@ +import { Navigation } from '@decky/ui'; +import { AnchorHTMLAttributes, FC } from 'react'; + +const ExternalLink: FC> = (props) => { + return ( + { + e.preventDefault(); + props.onClick ? props.onClick(e) : props.href && Navigation.NavigateToExternalWeb(props.href); + }} + /> + ); +}; + +export default ExternalLink; -- cgit v1.2.3