Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Dec 13, 2022
1 parent 99660ab commit 1b1db9f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/components/MDX/MDXLinkNode.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLAnchorElement> {
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
Expand All @@ -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 ?? '');
Expand Down

0 comments on commit 1b1db9f

Please sign in to comment.