Merge pull request #140 from ethereum/add-missing-link-prop

fix: adds missing legacyBehavior prop [Fixes #98]
pull/26459/head^2
Corwin Smith 2 years ago committed by GitHub
commit 4dee3f52f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/UI/ButtonLinkSecondary.tsx
  2. 2
      src/components/UI/Header.tsx
  3. 4
      src/components/UI/HeaderButtons.tsx
  4. 6
      src/components/UI/docs/Breadcrumbs.tsx
  5. 2
      src/components/UI/docs/DocsLinks.tsx
  6. 2
      src/components/UI/docs/DocumentNav.tsx
  7. 2
      src/components/UI/docs/LinksList.tsx
  8. 2
      src/components/UI/docs/MDComponents.tsx
  9. 2
      src/components/UI/downloads/DownloadsHero.tsx
  10. 4
      src/components/UI/homepage/HomeHero.tsx
  11. 6
      src/components/UI/homepage/QuickLinks.tsx
  12. 4
      src/components/layouts/Footer.tsx

@ -18,7 +18,7 @@ export const ButtonLinkSecondary: React.FC<Props> = ({ href, children, ...restPr
<Text textStyle='home-section-link-label'>{children}</Text>
</Link>
) : (
<NextLink href={href.toString()} passHref {...restProps}>
<NextLink href={href.toString()} passHref legacyBehavior {...restProps}>
<Link variant='button-link-secondary'>
<Text textStyle='home-section-link-label'>{children}</Text>
</Link>

@ -27,7 +27,7 @@ export const Header: FC = () => {
borderColor='primary'
flexGrow={2}
>
<NextLink href={'/'} passHref>
<NextLink href={'/'} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Text textStyle='header-font' whiteSpace='nowrap'>
go-ethereum

@ -25,7 +25,7 @@ export const HeaderButtons: FC<Props> = ({ close }) => {
return (
<Flex direction={{ base: 'column', md: 'row' }}>
{/* DOWNLOADS */}
<NextLink href={DOWNLOADS_PAGE} passHref>
<NextLink href={DOWNLOADS_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }} onClick={close}>
<Stack {...menuItemStyles}>
<Text textStyle={{ base: 'header-mobile-button', md: 'header-button' }}>downloads</Text>
@ -34,7 +34,7 @@ export const HeaderButtons: FC<Props> = ({ close }) => {
</NextLink>
{/* DOCUMENTATION */}
<NextLink href={DOCS_PAGE} passHref>
<NextLink href={DOCS_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }} onClick={close}>
<Stack {...menuItemStyles}>
<Text textStyle={{ base: 'header-mobile-button', md: 'header-button' }}>

@ -16,7 +16,11 @@ export const Breadcrumbs: FC = () => {
{pathSplit.map((path: string, idx: number) => {
return (
<BreadcrumbItem key={path}>
<NextLink href={`/${pathSplit.slice(0, idx + 1).join('/')}`} passHref>
<NextLink
href={`/${pathSplit.slice(0, idx + 1).join('/')}`}
passHref
legacyBehavior
>
<BreadcrumbLink color={idx + 1 === pathSplit.length ? 'body' : 'primary'}>
{path}
</BreadcrumbLink>

@ -52,7 +52,7 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => {
_groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }}
>
{to ? (
<NextLink href={to} passHref>
<NextLink href={to} passHref legacyBehavior>
<Link textDecoration='none !important'>
<Text
textStyle='docs-nav-dropdown'

@ -27,7 +27,7 @@ export const DocumentNav: FC<Props> = ({ content }) => {
<Divider borderColor='primary' my={`4 !important`} />
{parsedHeadings.map((heading, idx) => {
return (
<NextLink key={`${idx} ${heading?.title}`} href={`#${heading?.headingId}`}>
<NextLink key={`${idx} ${heading?.title}`} href={`#${heading?.headingId}`} legacyBehavior>
<Link m={0} textDecoration='none !important'>
<Text
color={activeHash === heading?.headingId ? 'body' : 'primary'}

@ -24,7 +24,7 @@ export const LinksList: FC<LinksListProps> = ({ links }) => {
_hover={{ background: 'primary', color: 'bg' }}
data-group
>
<NextLink href={to} passHref key={id}>
<NextLink href={to} passHref key={id} legacyBehavior>
<Link textDecoration='none !important'>
<Text
textStyle='docs-nav-links'

@ -35,7 +35,7 @@ const MDComponents = {
{children}
</Link>
) : (
<NextLink href={href} passHref>
<NextLink href={href} passHref legacyBehavior>
<Link variant='light'>{children}</Link>
</NextLink>
);

@ -82,7 +82,7 @@ export const DownloadsHero: FC<DownloadsHero> = ({
const { name, buildURL, Svg, ariaLabel } = DOWNLOAD_HEADER_BUTTONS[key];
return (
<NextLink key={key} href={buildURL} passHref>
<NextLink key={key} href={buildURL} passHref legacyBehavior>
<Button as='a' variant='downloadsHeader' width={{ base: '100%' }} h={16} data-group>
<HStack spacing={4}>
<Stack alignItems='center'>

@ -36,7 +36,7 @@ export const HomeHero: FC = () => {
alignItems={{ base: 'center', md: 'flex-start' }}
>
<Flex direction='column' alignItems='center' mr={{ md: 6 }}>
<NextLink href={DOWNLOADS_PAGE} passHref>
<NextLink href={DOWNLOADS_PAGE} passHref legacyBehavior>
<Button variant='primary' as='a' mb={1} data-group>
<Text textStyle='homepage-primary-label'>Download</Text>
</Button>
@ -48,7 +48,7 @@ export const HomeHero: FC = () => {
</Flex>
<Flex direction='column' alignItems='center'>
<NextLink href={DOCS_PAGE} passHref>
<NextLink href={DOCS_PAGE} passHref legacyBehavior>
<Button variant='primary' as='a' mb={1} data-group>
<Text textStyle='homepage-primary-label'>Documentation</Text>
</Button>

@ -28,7 +28,7 @@ export const QuickLinks: FC = () => {
</Stack>
</GridItem>
<GridItem borderBottom='2px solid' borderColor='primary'>
<NextLink href={`${DOCS_PAGE}/getting-started`} passHref>
<NextLink href={`${DOCS_PAGE}/getting-started`} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Stack
data-group
@ -66,7 +66,7 @@ export const QuickLinks: FC = () => {
</Stack>
</GridItem>
<GridItem borderBottom='2px solid' borderColor='primary'>
<NextLink href={FAQ_PAGE} passHref>
<NextLink href={FAQ_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Stack
data-group
@ -104,7 +104,7 @@ export const QuickLinks: FC = () => {
</Stack>
</GridItem>
<GridItem>
<NextLink href={CONTRIBUTING_PAGE} passHref>
<NextLink href={CONTRIBUTING_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Stack
data-group

@ -43,7 +43,7 @@ export const Footer: FC = () => {
borderColor='primary'
p={4}
>
<NextLink href={DOWNLOADS_PAGE} passHref>
<NextLink href={DOWNLOADS_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Text textStyle='footer-link-label'>DOWNLOADS</Text>
</Link>
@ -61,7 +61,7 @@ export const Footer: FC = () => {
borderColor='primary'
p={4}
>
<NextLink href={DOCS_PAGE} passHref>
<NextLink href={DOCS_PAGE} passHref legacyBehavior>
<Link _hover={{ textDecoration: 'none' }}>
<Text textStyle='footer-link-label'>DOCUMENTATION</Text>
</Link>

Loading…
Cancel
Save