File tree Expand file tree Collapse file tree 6 files changed +21
-28
lines changed
04-frameworks/08-nextjs/01-config Expand file tree Collapse file tree 6 files changed +21
-28
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ const RootLayout = (props: Props) => {
4949 const { children } = props;
5050 return (
5151 < html lang= " en" >
52- < body> {children}< / body>
52+ < body>
53+ < main> {children}< / main>
54+ < / body>
5355 < / html>
5456 );
5557};
@@ -64,23 +66,11 @@ _./app/page.tsx_
6466``` jsx
6567import React from ' react' ;
6668
67- interface Props {
68- children: React .ReactNode ;
69- }
70-
71- const RootLayout = (props : Props ) => {
72- const { children } = props;
73- return (
74- < html lang= " en" >
75- < body>
76- < main> {children}< / main>
77- < / body>
78- < / html>
79- );
69+ const RootPage = () => {
70+ return < h2> Hello from Nextjs< / h2> ;
8071};
8172
82- export default RootLayout ;
83-
73+ export default RootPage ;
8474```
8575
8676Run ` start ` :
Original file line number Diff line number Diff line change 99 "author" : " Lemoncode" ,
1010 "license" : " MIT" ,
1111 "dependencies" : {
12- "@hono/node-server" : " ^1.12.2 " ,
13- "hono" : " ^4.5.11 "
12+ "@hono/node-server" : " ^1.13.8 " ,
13+ "hono" : " ^4.6.20 "
1414 },
1515 "devDependencies" : {
16- "tsx" : " ^4.19.0 "
16+ "tsx" : " ^4.19.2 "
1717 }
1818}
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ const RootLayout = (props: Props) => {
88 const { children } = props ;
99 return (
1010 < html lang = "en" >
11- < body > { children } </ body >
11+ < body >
12+ < main > { children } </ main >
13+ </ body >
1214 </ html >
1315 ) ;
1416} ;
Original file line number Diff line number Diff line change 22/// <reference types="next/image-types/global" />
33
44// NOTE: This file should not be edited
5- // see https://nextjs.org/docs/app/building-your-application/configuring /typescript for more information.
5+ // see https://nextjs.org/docs/app/api-reference/config /typescript for more information.
Original file line number Diff line number Diff line change 1212 "author" : " Lemoncode" ,
1313 "license" : " MIT" ,
1414 "dependencies" : {
15- "next" : " ^14.2.9 " ,
16- "react" : " ^18.3.1 " ,
17- "react-dom" : " ^18.3.1 "
15+ "next" : " ^15.1.6 " ,
16+ "react" : " ^19.0.0 " ,
17+ "react-dom" : " ^19.0.0 "
1818 },
1919 "devDependencies" : {
20- "@types/node" : " 22.5.4 " ,
21- "@types/react" : " ^18.3.5 " ,
22- "@types/react-dom" : " ^18.3.0 " ,
23- "typescript" : " ^5.6.2 "
20+ "@types/node" : " 22.13.0 " ,
21+ "@types/react" : " ^19.0.8 " ,
22+ "@types/react-dom" : " ^19.0.3 " ,
23+ "typescript" : " ^5.7.3 "
2424 }
2525}
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3+ "target" : " ES2017" ,
34 "lib" : [
45 " dom" ,
56 " dom.iterable" ,
You can’t perform that action at this time.
0 commit comments