|
1 |
| -import Image from 'next/image' |
2 |
| -import { Inter } from '@next/font/google' |
3 |
| -import styles from './page.module.css' |
4 |
| -import Link from 'next/link'; |
5 |
| - |
6 |
| -const inter = Inter({ subsets: ['latin'] }) |
| 1 | +import { redirect, RedirectType } from 'next/navigation'; |
7 | 2 |
|
8 | 3 | export default function Home() {
|
9 |
| - return ( |
10 |
| - <main className={styles.main}> |
11 |
| - <div className={styles.description}> |
12 |
| - <p> |
13 |
| - Get started by editing |
14 |
| - <code className={styles.code}>src/app/page.tsx</code> |
15 |
| - </p> |
16 |
| - <div> |
17 |
| - <a |
18 |
| - href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" |
19 |
| - target="_blank" |
20 |
| - rel="noopener noreferrer" |
21 |
| - > |
22 |
| - By{' '} |
23 |
| - <Image |
24 |
| - src="/vercel.svg" |
25 |
| - alt="Vercel Logo" |
26 |
| - className={styles.vercelLogo} |
27 |
| - width={100} |
28 |
| - height={24} |
29 |
| - priority |
30 |
| - /> |
31 |
| - </a> |
32 |
| - </div> |
33 |
| - </div> |
34 |
| - <Link href="/dashboard">Go to Dashboard</Link> |
35 |
| - <div className={styles.center}> |
36 |
| - <Image |
37 |
| - className={styles.logo} |
38 |
| - src="/next.svg" |
39 |
| - alt="Next.js Logo" |
40 |
| - width={180} |
41 |
| - height={37} |
42 |
| - priority |
43 |
| - /> |
44 |
| - <div className={styles.thirteen}> |
45 |
| - <Image src="/thirteen.svg" alt="13" width={40} height={31} priority /> |
46 |
| - </div> |
47 |
| - </div> |
48 |
| - |
49 |
| - <div className={styles.grid}> |
50 |
| - <a href="/dashboard" |
51 |
| - className={styles.card} |
52 |
| - target="_blank" |
53 |
| - rel="noopener noreferrer" |
54 |
| - > |
55 |
| - <h2 className={inter.className}> |
56 |
| - Docs <span>-></span> |
57 |
| - </h2> |
58 |
| - <p className={inter.className}> |
59 |
| - Find in-depth information about Next.js features and API. |
60 |
| - </p> |
61 |
| - </a> |
62 |
| - |
63 |
| - <a |
64 |
| - href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" |
65 |
| - className={styles.card} |
66 |
| - target="_blank" |
67 |
| - rel="noopener noreferrer" |
68 |
| - > |
69 |
| - <h2 className={inter.className}> |
70 |
| - Templates <span>-></span> |
71 |
| - </h2> |
72 |
| - <p className={inter.className}>Explore the Next.js 13 playground.</p> |
73 |
| - </a> |
74 |
| - |
75 |
| - <a |
76 |
| - href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" |
77 |
| - className={styles.card} |
78 |
| - target="_blank" |
79 |
| - rel="noopener noreferrer" |
80 |
| - > |
81 |
| - <h2 className={inter.className}> |
82 |
| - Deploy <span>-></span> |
83 |
| - </h2> |
84 |
| - <p className={inter.className}> |
85 |
| - Instantly deploy your Next.js site to a shareable URL with Vercel. |
86 |
| - </p> |
87 |
| - </a> |
88 |
| - </div> |
89 |
| - </main> |
90 |
| - ) |
| 4 | + redirect('/dashboard') |
91 | 5 | }
|
0 commit comments