feat(app): migrate from pages router to app router

This commit is contained in:
Wini_Fy
2026-02-06 12:41:52 +07:00
parent 7daddb2e8c
commit 5fac4b1459
5 changed files with 55 additions and 46 deletions

55
app/not-found.tsx Normal file
View File

@@ -0,0 +1,55 @@
import Link from "next/link";
export default function NotFound() {
return (
<>
<section
className="breadcrumb-wrapper fix bg-cover"
style={{
backgroundImage: "url(/assets/img/inner-page/breadcrumb.jpg)",
}}
>
<div className="shape">
<img src="/assets/img/inner-page/shape.png" alt="img" />
</div>
<div className="container">
<div className="page-heading">
<h1 className="breadcrumb-title">Page Not Found</h1>
<ul className="breadcrumb-list">
<li>
<Link href="/">Home</Link>
</li>
<li>
<i className="fa-solid fa-chevron-right"></i>
</li>
<li>
<a href="#">Not Found</a>
</li>
</ul>
</div>
</div>
</section>
<section className="section-padding">
<div className="container">
<div className="row justify-content-center">
<div className="col-lg-8 text-center">
<div className="error-content">
<h2 className="mb-3">404 - Page Not Found</h2>
<p className="mb-4">
The page you're looking for could not be found. It may have been moved or deleted. Please check the URL or return to the home page.
</p>
<div className="button-group">
<Link href="/" className="theme-btn">
Back to Home
<i className="fa-solid fa-arrow-right"></i>
</Link>
</div>
</div>
</div>
</div>
</div>
</section>
</>
);
}

View File

@@ -1,14 +0,0 @@
import { useRouter } from "next/router";
export default function LevelSlugPage() {
const router = useRouter();
const { level, slug } = router.query;
return (
<div style={{ padding: 20 }}>
<h1>Lesson page</h1>
<p>Level: {level}</p>
<p>Slug: {slug}</p>
</div>
);
}

View File

@@ -1,13 +0,0 @@
import { useRouter } from "next/router";
export default function LevelPage() {
const router = useRouter();
const { level } = router.query;
return (
<div style={{ padding: 20 }}>
<h1>Level page</h1>
<p>Level: {level}</p>
</div>
);
}

View File

@@ -1,6 +0,0 @@
import type { AppProps } from "next/app";
import "../app/globals.css";
export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}

View File

@@ -1,13 +0,0 @@
import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}