referrer.patch
1 --- a/yaak/src-web/components/core/Link.tsx 2 +++ b/yaak/src-web/components/core/Link.tsx 3 @@ -1,7 +1,6 @@ 4 import { Link as RouterLink } from '@tanstack/react-router'; 5 import classNames from 'classnames'; 6 import type { HTMLAttributes } from 'react'; 7 -import { appInfo } from '../../lib/appInfo'; 8 import { Icon } from './Icon'; 9 10 interface Props extends HTMLAttributes<HTMLAnchorElement> { 11 @@ -20,19 +19,12 @@ 12 ); 13 14 if (isExternal) { 15 - const isYaakLink = href.startsWith('https://yaak.app'); 16 - let finalHref = href; 17 - if (isYaakLink) { 18 - const url = new URL(href); 19 - url.searchParams.set('ref', appInfo.identifier); 20 - finalHref = url.toString(); 21 - } 22 return ( 23 // eslint-disable-next-line react/jsx-no-target-blank 24 <a 25 - href={finalHref} 26 + href={href} 27 target="_blank" 28 - rel={isYaakLink ? undefined : 'noopener noreferrer'} 29 + rel="noopener noreferrer" 30 onClick={(e) => e.preventDefault()} 31 className={className} 32 {...other}