2019-08-06 22:26:01 +02:00
|
|
|
import Link from 'next/link'
|
|
|
|
|
2020-02-27 18:57:39 +01:00
|
|
|
export async function getStaticProps() {
|
2020-02-24 10:14:46 +01:00
|
|
|
// throw new Error('oops from getStaticProps')
|
2019-09-25 17:29:22 +02:00
|
|
|
return {
|
|
|
|
props: { world: 'world', time: new Date().getTime() },
|
|
|
|
// bad-prop
|
2020-04-02 20:29:41 +02:00
|
|
|
unstable_revalidate: 1,
|
2019-09-25 17:29:22 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-24 10:50:04 +02:00
|
|
|
const Page = ({ world, time }) => {
|
2019-08-06 22:26:01 +02:00
|
|
|
return (
|
|
|
|
<>
|
2020-02-24 10:14:46 +01:00
|
|
|
{/* <div id='after-change'>idk</div> */}
|
2019-08-06 22:26:01 +02:00
|
|
|
<p>hello {world}</p>
|
2019-09-24 10:50:04 +02:00
|
|
|
<span>time: {time}</span>
|
2020-03-09 18:30:44 +01:00
|
|
|
<Link href="/non-json/[p]" as="/non-json/1">
|
|
|
|
<a id="non-json">to non-json</a>
|
|
|
|
</Link>
|
|
|
|
<br />
|
2020-01-17 17:54:00 +01:00
|
|
|
<Link href="/another?hello=world" as="/another/?hello=world">
|
2019-11-11 04:24:53 +01:00
|
|
|
<a id="another">to another</a>
|
2019-08-06 22:26:01 +02:00
|
|
|
</Link>
|
|
|
|
<br />
|
2019-11-11 04:24:53 +01:00
|
|
|
<Link href="/something">
|
|
|
|
<a id="something">to something</a>
|
2019-08-06 22:26:01 +02:00
|
|
|
</Link>
|
|
|
|
<br />
|
2019-11-11 04:24:53 +01:00
|
|
|
<Link href="/normal">
|
|
|
|
<a id="normal">to normal</a>
|
2019-08-06 22:26:01 +02:00
|
|
|
</Link>
|
|
|
|
<br />
|
2019-11-11 04:24:53 +01:00
|
|
|
<Link href="/blog/[post]" as="/blog/post-1">
|
|
|
|
<a id="post-1">to dynamic</a>
|
2019-08-06 22:26:01 +02:00
|
|
|
</Link>
|
2019-12-13 22:54:01 +01:00
|
|
|
<Link href="/blog/[post]" as="/blog/post-100">
|
|
|
|
<a id="broken-post">to broken</a>
|
|
|
|
</Link>
|
2020-03-06 07:35:15 +01:00
|
|
|
<Link href="/blog/[post]" as="/blog/post-999" prefetch={false}>
|
2020-02-13 05:06:41 +01:00
|
|
|
<a id="broken-at-first-post">to broken at first</a>
|
|
|
|
</Link>
|
2019-08-06 22:26:01 +02:00
|
|
|
<br />
|
2019-11-11 04:24:53 +01:00
|
|
|
<Link href="/blog/[post]/[comment]" as="/blog/post-1/comment-1">
|
|
|
|
<a id="comment-1">to another dynamic</a>
|
2019-08-06 22:26:01 +02:00
|
|
|
</Link>
|
2020-01-20 22:44:50 +01:00
|
|
|
<Link href="/catchall/[...slug]" as="/catchall/first">
|
|
|
|
<a id="to-catchall">to catchall</a>
|
|
|
|
</Link>
|
2019-08-06 22:26:01 +02:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Page
|