From 1b1db9fae39b0f4f6db4f717dd5210340e3ea727 Mon Sep 17 00:00:00 2001 From: Jeremy Asuncion Date: Wed, 2 Nov 2022 21:28:06 -0700 Subject: [PATCH] Fix type errors --- frontend/src/components/MDX/MDXLinkNode.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/MDX/MDXLinkNode.tsx b/frontend/src/components/MDX/MDXLinkNode.tsx index dec159866..1c4e3ae24 100644 --- a/frontend/src/components/MDX/MDXLinkNode.tsx +++ b/frontend/src/components/MDX/MDXLinkNode.tsx @@ -1,10 +1,15 @@ import { get } from 'lodash'; +import { AnchorHTMLAttributes } from 'react'; -import { Link, Props as LinkProps } from '@/components/Link'; +import { Link } from '@/components/Link'; import { useLinks } from '@/hooks/useLinks'; import { LinkInfo } from '@/types'; import { isExternalUrl } from '@/utils'; +interface MDXLinkNodeProps extends AnchorHTMLAttributes { + newTab?: boolean; +} + /** * Helper component that renders link nodes for the MDX renderer. If the * component uses a special hub link key, it will automatically be filled with @@ -17,7 +22,7 @@ import { isExternalUrl } from '@/utils'; * [link to the faq]({FAQ}) * ``` */ -export function MDXLinkNode({ href, ...props }: LinkProps) { +export function MDXLinkNode({ href, ...props }: MDXLinkNodeProps) { const links = useLinks(); let newHref = decodeURI(href ?? '');