mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
20 lines
302 B
JavaScript
20 lines
302 B
JavaScript
import React from 'react'
|
|
import Link from 'next/link'
|
|
|
|
function page() {
|
|
return (
|
|
<Link href="/" id="nav">
|
|
Client side nav
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
page.getInitialProps = () => {
|
|
if (typeof window !== 'undefined') {
|
|
throw new Error('Oops from Home')
|
|
}
|
|
return {}
|
|
}
|
|
|
|
export default page
|