mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-27 09:44:36 +03:00
Fix links
This commit is contained in:
parent
d3f95831aa
commit
d1c4d65590
|
@ -1,6 +1,6 @@
|
||||||
import React, { Fragment } from 'react'
|
import React, { Fragment } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Link as GatsbyLink } from 'gatsby'
|
import NextLink from 'next/link'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
|
||||||
import Icon from './icon'
|
import Icon from './icon'
|
||||||
|
@ -58,22 +58,22 @@ export default function Link({
|
||||||
if ((dest && /^#/.test(dest)) || onClick) {
|
if ((dest && /^#/.test(dest)) || onClick) {
|
||||||
return (
|
return (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<a href={dest} onClick={onClick} className={linkClassNames}>
|
<NextLink href={dest} onClick={onClick} className={linkClassNames}>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</NextLink>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<GatsbyLink
|
<NextLink
|
||||||
to={dest}
|
href={dest}
|
||||||
className={linkClassNames}
|
className={linkClassNames}
|
||||||
activeClassName={activeClassName}
|
activeClassName={activeClassName}
|
||||||
{...other}
|
{...other}
|
||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</GatsbyLink>
|
</NextLink>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -81,9 +81,9 @@ export default function Link({
|
||||||
const relTarget = isInternal ? {} : { rel: 'noopener nofollow noreferrer', target: '_blank' }
|
const relTarget = isInternal ? {} : { rel: 'noopener nofollow noreferrer', target: '_blank' }
|
||||||
return (
|
return (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<a href={dest} className={linkClassNames} {...relTarget} {...other}>
|
<NextLink href={dest} className={linkClassNames} {...relTarget} {...other}>
|
||||||
{content}
|
{content}
|
||||||
</a>
|
</NextLink>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user