Skip to content

Commit 3ccbfc2

Browse files
committed
feat: add App router and layout
1 parent 2b1863c commit 3ccbfc2

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/basic-features/typescript for more information.

src/app/layout.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function RootLayout({ children }: { children: React.ReactNode }) {
2+
return (
3+
<html lang="en">
4+
<body>{children}</body>
5+
</html>
6+
)
7+
}
8+
9+
export default RootLayout

tsconfig.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -14,13 +18,26 @@
1418
"isolatedModules": true,
1519
"jsx": "preserve",
1620
"incremental": true,
17-
"types": ["cypress"],
21+
"types": [
22+
"cypress"
23+
],
1824
"baseUrl": "./src",
1925
"paths": {
20-
"@lib/*": ["lib/*"],
21-
"@modules/*": ["modules/*"],
22-
"@pages/*": ["pages/*"]
23-
}
26+
"@lib/*": [
27+
"lib/*"
28+
],
29+
"@modules/*": [
30+
"modules/*"
31+
],
32+
"@pages/*": [
33+
"pages/*"
34+
]
35+
},
36+
"plugins": [
37+
{
38+
"name": "next"
39+
}
40+
]
2441
},
2542
"include": [
2643
"next-env.d.ts",
@@ -30,6 +47,7 @@
3047
"cypress/support/commands.js",
3148
"cypress/integration/product.spec.js",
3249
"cypress/plugins/index.js",
50+
".next/types/**/*.ts"
3351
],
3452
"exclude": [
3553
"node_modules",

0 commit comments

Comments
 (0)