File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 */
1111
1212import { Children , cloneElement } from 'react' ;
13- import NextLink from 'next/link' ;
13+ import Link from 'next/link' ;
1414import cn from 'classnames' ;
1515
1616import { ExternalLink } from 'components/ExternalLink' ;
1717
18- function Link ( {
18+ function MDXLink ( {
1919 href,
2020 className,
2121 children,
@@ -42,18 +42,13 @@ function Link({
4242 < ExternalLink href = { href } className = { cn ( classes , className ) } { ...props } >
4343 { modifiedChildren }
4444 </ ExternalLink >
45- ) : href . startsWith ( '#' ) ? (
46- // eslint-disable-next-line jsx-a11y/anchor-has-content
47- < a className = { cn ( classes , className ) } href = { href } { ...props } >
48- { modifiedChildren }
49- </ a >
5045 ) : (
51- < NextLink href = { href } className = { cn ( classes , className ) } { ...props } >
46+ < Link href = { href } className = { cn ( classes , className ) } { ...props } >
5247 { modifiedChildren }
53- </ NextLink >
48+ </ Link >
5449 ) }
5550 </ >
5651 ) ;
5752}
5853
59- export default Link ;
54+ export default MDXLink ;
You can’t perform that action at this time.
0 commit comments