Skip to content

Commit

Permalink
Remove prefetch attributes from examples (vercel#8481)
Browse files Browse the repository at this point in the history
* Remove prefetch from with-apollo-and-redux-saga example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from using-inferno example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-and-redux example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-auth example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-tailwindcss example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-graphql-hooks example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from data-fetch example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
  • Loading branch information
HaNdTriX authored and Timer committed Aug 23, 2019
1 parent 7eda3bc commit a9325f1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/data-fetch/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Index extends React.Component {
return (
<div>
<p>Next.js has {this.props.stars} ⭐️</p>
<Link prefetch href='/preact'>
<Link href='/preact'>
<a>How about preact?</a>
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/data-fetch/pages/preact.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Preact extends React.Component {
return (
<div>
<p>Preact has {this.props.stars} ⭝︝</p>
<Link prefetch href='/'>
<Link href='/'>
<a>I bet next has more stars (?)</a>
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/using-inferno/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Link from 'next/link'
export default () => (
<div>
Hello World.{' '}
<Link prefetch href='/about'>
<Link href='/about'>
<a>About</a>
</Link>
</div>
Expand Down
6 changes: 3 additions & 3 deletions examples/with-apollo-and-redux-saga/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { withRouter } from 'next/router'

const Header = ({ router: { pathname } }) => (
<header>
<Link prefetch href='/'>
<Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link>
<Link prefetch href='/about'>
<Link href='/about'>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link>
<Link prefetch href='/blog'>
<Link href='/blog'>
<a className={pathname === '/blog' ? 'is-active' : ''}>Blog</a>
</Link>
<style jsx>{`
Expand Down
6 changes: 3 additions & 3 deletions examples/with-apollo-and-redux/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { withRouter } from 'next/router'

const Header = ({ router: { pathname } }) => (
<header>
<Link prefetch href='/'>
<Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link>
<Link prefetch href='/apollo'>
<Link href='/apollo'>
<a className={pathname === '/apollo' ? 'is-active' : ''}>Apollo</a>
</Link>
<Link prefetch href='/redux'>
<Link href='/redux'>
<a className={pathname === '/redux' ? 'is-active' : ''}>Redux</a>
</Link>
<style jsx>{`
Expand Down
2 changes: 1 addition & 1 deletion examples/with-apollo-auth/pages/create-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class CreateAccount extends React.Component {
<RegisterBox />
<hr />
Already have an account?{' '}
<Link prefetch href='/signin'>
<Link href='/signin'>
<a>Sign in</a>
</Link>
</>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-apollo-auth/pages/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class Signin extends React.Component {
<SigninBox />
<hr />
New?{' '}
<Link prefetch href='/create-account'>
<Link href='/create-account'>
<a>Create account</a>
</Link>
</React.Fragment>
Expand Down
4 changes: 2 additions & 2 deletions examples/with-graphql-hooks/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { withRouter } from 'next/router'

const Header = ({ router: { pathname } }) => (
<header>
<Link prefetch href='/'>
<Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link>
<Link prefetch href='/about'>
<Link href='/about'>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link>
<style jsx>{`
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/components/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Nav () {
<nav>
<ul className='flex justify-between items-center p-8'>
<li>
<Link prefetch href='/'>
<Link href='/'>
<a className='text-blue-500 no-underline'>Home</a>
</Link>
</li>
Expand Down

0 comments on commit a9325f1

Please sign in to comment.