Make sure links open externally

This commit is contained in:
49lf
2024-07-31 15:08:18 -04:00
parent 4c2b807890
commit 871cc4df35
8 changed files with 33 additions and 12 deletions

View File

@ -1,4 +1,5 @@
import { ActionIcon, ActionIconProps } from './ActionIcon'
import { openExternalBrowserIfDesktop } from 'lib/openWindow'
import React, { ForwardedRef, forwardRef } from 'react'
import { paths } from 'lib/paths'
import { Link } from 'react-router-dom'
@ -107,6 +108,7 @@ export const ActionButton = forwardRef((props: ActionButtonProps, ref) => {
ref={ref as ForwardedRef<HTMLAnchorElement>}
to={to || paths.INDEX}
className={classNames}
onClick={openExternalBrowserIfDesktop(to)}
{...rest}
target="_blank"
>