Skip to content

Commit

Permalink
feat(Next): Add 404 not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed Apr 26, 2024
1 parent 1dd7532 commit 09a4a00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ export default function RootLayout({
}) {
return (
<html lang="en">
App folder
<body>{children}</body>
<body>
<h1>App root layout</h1>
{children}
</body>
</html>
)
}
11 changes: 11 additions & 0 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Link from '../src/components/Link'

export default function NotFound() {
return (
<div>
<h2>Not Found</h2>
<p>Could not find requested resource</p>
<Link href="/">Return Home</Link>
</div>
)
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsxImportSource": "@emotion/react",
"plugins": [
{
"name": "next"
Expand Down

0 comments on commit 09a4a00

Please sign in to comment.