Skip to content

Commit e9198e5

Browse files
Migrate to NextJS app
1 parent 3fe9bbc commit e9198e5

11 files changed

Lines changed: 269 additions & 244 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ yarn dev
1212

1313
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1414

15-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
15+
You can start editing the page by modifying `pages/page.tsx`. The page auto-updates as you edit the file.
1616

1717
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
1818

package-lock.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"dependencies": {
1616
"next": "^14.0.4",
1717
"react": "^18.2.0",
18-
"react-dom": "^18.2.0"
18+
"react-dom": "^18.2.0",
19+
"simpledotcss": "^2.2.1"
1920
},
2021
"devDependencies": {
2122
"@types/node": "^20.10.6",

pages/api/hello.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

pages/index.tsx

Lines changed: 0 additions & 86 deletions
This file was deleted.

pages/learn-frontend/index.tsx

Lines changed: 0 additions & 130 deletions
This file was deleted.

pages/_app.tsx renamed to src/app/layout.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
import type { AppProps } from 'next/app'
1+
import type { ReactNode } from 'react'
2+
import { Metadata } from 'next'
23
import Script from 'next/script'
4+
import '@/styles/global.css'
35

4-
function MyApp({ Component, pageProps }: AppProps) {
6+
export const metadata: Metadata = {
7+
title: 'Easy Deep Learning',
8+
description: 'Education technologies, news, books, courses, videos, articles, podcasts, and more.',
9+
}
10+
11+
export default function RootLayout ({
12+
children,
13+
}: {
14+
children: ReactNode
15+
}) {
516
return (
6-
<>
7-
<Component {...pageProps} />
17+
<html lang="en">
18+
<body>
19+
<main>
20+
{children}
21+
</main>
22+
<footer>
823
<Script
924
src="https://www.googletagmanager.com/gtag/js?id=G-6GC4XK3S9Z"
1025
strategy="afterInteractive"
@@ -18,9 +33,8 @@ function MyApp({ Component, pageProps }: AppProps) {
1833
gtag('config', 'G-6GC4XK3S9Z');
1934
`}
2035
</Script>
21-
</>
22-
36+
</footer>
37+
</body>
38+
</html>
2339
)
2440
}
25-
26-
export default MyApp

0 commit comments

Comments
 (0)