forked from vercel/next.js
/
index.tsx
34 lines (32 loc) · 828 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { useRouter } from 'next/router'
import Link from 'next/link'
import { type PageConfig } from 'next'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { StyleRegistry, createStyleRegistry } from 'styled-jsx'
export const config: PageConfig = {}
export default function Page() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const router = useRouter()
return (
<>
<p>hello world</p>
<Link
href="/another"
onClick={(e) => {
console.log(e.currentTarget)
}}
>
to /another
</Link>
{/** @ts-expect-error - foo does not exist on React.MouseEvent */}
<Link
href="/another"
onClick={(e) => {
console.log(e.foo)
}}
>
to /another
</Link>
</>
)
}