2017-05-09 21:03:20 +00:00
|
|
|
import Link from 'next/link'
|
|
|
|
import Router from 'next/router'
|
|
|
|
|
|
|
|
function routeToAbout (e) {
|
|
|
|
e.preventDefault()
|
|
|
|
Router.push('/about')
|
|
|
|
}
|
|
|
|
|
|
|
|
export default () => (
|
|
|
|
<div id='home-page'>
|
|
|
|
<div>
|
2017-05-10 01:54:08 +00:00
|
|
|
<Link href='/about'>
|
|
|
|
<a id='about-via-link'>About via Link</a>
|
2017-05-09 21:03:20 +00:00
|
|
|
</Link>
|
|
|
|
<a
|
|
|
|
href='#'
|
|
|
|
onClick={routeToAbout}
|
|
|
|
id='about-via-router'
|
|
|
|
>
|
|
|
|
About via Router
|
|
|
|
</a>
|
2017-05-10 01:54:08 +00:00
|
|
|
<Link href='/counter'>
|
|
|
|
<a id='counter'>Counter</a>
|
2017-05-09 21:03:20 +00:00
|
|
|
</Link>
|
|
|
|
<Link
|
|
|
|
href='/dynamic?text=cool+dynamic+text'
|
|
|
|
>
|
2017-05-10 01:54:08 +00:00
|
|
|
<a id='get-initial-props'>getInitialProps</a>
|
2017-05-09 21:03:20 +00:00
|
|
|
</Link>
|
|
|
|
<Link
|
|
|
|
href='/dynamic?text=next+export+is+nice'
|
|
|
|
as='/dynamic/one'
|
|
|
|
>
|
2017-05-10 01:54:08 +00:00
|
|
|
<a id='dynamic-1'>Dynamic 1</a>
|
2017-05-09 21:03:20 +00:00
|
|
|
</Link>
|
|
|
|
<Link
|
|
|
|
href='/dynamic?text=zeit+is+awesome'
|
|
|
|
as='/dynamic/two'
|
|
|
|
>
|
2017-05-10 01:54:08 +00:00
|
|
|
<a id='dynamic-2'>Dynamic 2</a>
|
2017-05-09 21:03:20 +00:00
|
|
|
</Link>
|
2017-06-13 06:14:31 +00:00
|
|
|
<Link
|
|
|
|
href='/dynamic?text=zeit+is+awesome#cool'
|
|
|
|
>
|
|
|
|
<a id='with-hash'>With Hash</a>
|
|
|
|
</Link>
|
2017-10-05 18:33:10 +00:00
|
|
|
<Link
|
|
|
|
href='/dynamic?text=this+file+has+an+extension'
|
|
|
|
as='/file-name.md'
|
|
|
|
>
|
|
|
|
<a id='path-with-extension'>Path with extension</a>
|
|
|
|
</Link>
|
2017-05-11 16:09:31 +00:00
|
|
|
<Link href='/level1'>
|
|
|
|
<a id='level1-home-page'>Level1 home page</a>
|
|
|
|
</Link>
|
|
|
|
<Link href='/level1/about'>
|
|
|
|
<a id='level1-about-page'>Level1 about page</a>
|
|
|
|
</Link>
|
2017-05-15 04:33:35 +00:00
|
|
|
<Link href='/dynamic-imports'>
|
|
|
|
<a id='dynamic-imports-page'>Dynamic imports page</a>
|
|
|
|
</Link>
|
2017-05-09 21:03:20 +00:00
|
|
|
</div>
|
|
|
|
<p>This is the home page</p>
|
|
|
|
<style jsx>{`
|
|
|
|
a {
|
|
|
|
margin: 0 10px 0 0;
|
|
|
|
}
|
|
|
|
`}</style>
|
|
|
|
</div>
|
|
|
|
)
|