update 15/01

This commit is contained in:
2026-01-15 17:30:04 +07:00
parent f5de4a5313
commit b921d73f73
20 changed files with 618 additions and 259 deletions

View File

@@ -11,13 +11,18 @@ import ArticleHome from "@/components/article/home";
export default async function SlugPage({
params,
}: {
params: { slug: string };
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
if (!slug) return notFound();
const { slug } = await params;
if (!slug) {
notFound();
}
const result = findBySlug(slug);
if (!result) return notFound();
if (!result) {
notFound();
}
switch (result.type) {
case "product_category":
@@ -36,6 +41,7 @@ export default async function SlugPage({
return <ArticleDetail slug={result.data.slug} />;
default:
return notFound();
const _exhaustive: never = result;
notFound();
}
}

View File

@@ -1,8 +1,21 @@
import Link from "next/link"
export default function NotFound() {
return (
<div style={{ padding: 40 }}>
<h1>404</h1>
<p>Trang không tồn tại</p>
<div className="error-page bg-white py-10">
<div className="container">
<div className="text-18 text-dark text-center pt-4 pb-5">
<img src="/images/404-page-1.png" alt="Không tìm thấy" width={1} height={1} className="block w-auto h-auto m-auto" style={{ maxWidth: 600 }} />
<h1 className="text-36 mt-5"> Không Tìm Thấy </h1>
<p className="py-4">
Xin lỗi, nhưng trang bạn yêu cầu không tìm thấy hoặc đã bị xóa bỏ. Vui lòng thử lại.
</p>
<Link className="red" href="https://hoanghapc.vn">
<b> Quay lại trang chủ</b>
</Link>
</div>
</div>
</div>
);
}