Skip to content

Commit

Permalink
fix(TextLink): fix types (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Sep 15, 2022
1 parent 0228f95 commit 02eb855
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/component-library/TextLink/TextLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ type TextLinkProps = Props & NativeAttrs;

const TextLink = forwardRef<HTMLAnchorElement, TextLinkProps>(
({ 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 <BaseTextLink ref={ref} as={Link} $color={color} {...props} {...linkProps} />;
}
Expand Down

2 comments on commit 02eb855

@vercel
Copy link

@vercel vercel bot commented on 02eb855 Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 02eb855 Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.