-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathindex.js
37 lines (33 loc) · 1.06 KB
/
index.js
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
35
36
37
import Head from 'next/head'
import Link from 'next/link'
import { useRouter } from 'next/router'
import styles from '../styles/Home.module.css'
export default function Home() {
const { locale } = useRouter()
return (
<div className={styles.container}>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<p>The current locale is {locale}</p>
<div className={styles.grid}>
<Link href="/dynamic/dynamic-1" className={styles.card}>
<h2>Dynamic Page</h2>
</Link>
<Link href="/fallback/dynamic-2" className={styles.card}>
<h2>Fallback Page</h2>
</Link>
<Link href="/redirectme" className={styles.card}>
<h2>Redirect me</h2>
</Link>
</div>
</main>
</div>
)
}