Skip to content

Commit

Permalink
remove next/link (#10625)
Browse files Browse the repository at this point in the history
  • Loading branch information
adithwip committed Feb 21, 2020
1 parent 40217b7 commit fb72982
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 41 deletions.
33 changes: 13 additions & 20 deletions examples/with-chakra-ui/src/components/CTA.js
@@ -1,4 +1,3 @@
import Link from 'next/link'
import { Link as ChakraLink, Button } from '@chakra-ui/core'

import { Container } from './Container'
Expand All @@ -12,27 +11,21 @@ export const CTA = () => (
maxWidth="48rem"
py={2}
>
<Link isExternal href="https://chakra-ui.com">
<ChakraLink isExternal href="https://chakra-ui.com" flexGrow={1} mx={2}>
<Button width="100%" variant="outline" variantColor="green">
chakra-ui
</Button>
</ChakraLink>
</Link>
<Link
<ChakraLink isExternal href="https://chakra-ui.com" flexGrow={1} mx={2}>
<Button width="100%" variant="outline" variantColor="green">
chakra-ui
</Button>
</ChakraLink>

<ChakraLink
isExternal
href="https://github.com/zeit/next.js/blob/canary/examples/with-chakra-ui"
flexGrow={3}
mx={2}
>
<ChakraLink
isExternal
href="https://github.com/zeit/next.js/blob/canary/examples/with-chakra-ui"
flexGrow={3}
mx={2}
>
<Button width="100%" variant="solid" variantColor="green">
View Repo
</Button>
</ChakraLink>
</Link>
<Button width="100%" variant="solid" variantColor="green">
View Repo
</Button>
</ChakraLink>
</Container>
)
32 changes: 11 additions & 21 deletions examples/with-chakra-ui/src/pages/index.js
@@ -1,5 +1,4 @@
import React from 'react'
import Link from 'next/link'
import { withTheme } from 'emotion-theming'
import {
Link as ChakraLink,
Expand Down Expand Up @@ -29,29 +28,20 @@ const Index = () => (
<List spacing={3} my={0}>
<ListItem>
<ListIcon icon="check-circle" color="green.500" />
<Link href="https://chakra-ui.com">
<ChakraLink
isExternal
href="https://chakra-ui.com"
flexGrow={1}
mr={2}
>
Chakra UI <Icon name="external-link" mx="2px" />
</ChakraLink>
</Link>
<ChakraLink
isExternal
href="https://chakra-ui.com"
flexGrow={1}
mr={2}
>
Chakra UI <Icon name="external-link" mx="2px" />
</ChakraLink>
</ListItem>
<ListItem>
<ListIcon icon="check-circle" color="green.500" />
<Link href="https://nextjs.org">
<ChakraLink
isExternal
href="https://nextjs.org"
flexGrow={1}
mr={2}
>
Next.js <Icon name="external-link" mx="2px" />
</ChakraLink>
</Link>
<ChakraLink isExternal href="https://nextjs.org" flexGrow={1} mr={2}>
Next.js <Icon name="external-link" mx="2px" />
</ChakraLink>
</ListItem>
</List>
</Main>
Expand Down

0 comments on commit fb72982

Please sign in to comment.