diff --git a/src/component-library/TextLink/TextLink.tsx b/src/component-library/TextLink/TextLink.tsx index c0c20707d0..a31f6b54dd 100644 --- a/src/component-library/TextLink/TextLink.tsx +++ b/src/component-library/TextLink/TextLink.tsx @@ -15,7 +15,9 @@ type TextLinkProps = Props & NativeAttrs; const TextLink = forwardRef( ({ color = 'primary', external, to, ...props }, ref): JSX.Element => { - const linkProps: TextLinkProps = external ? { to: { pathname: to }, target: '_blank', rel: 'noreferrer' } : { to }; + const linkProps: TextLinkProps = external + ? { to: { pathname: to as string }, target: '_blank', rel: 'noreferrer' } + : { to }; return ; }