This commit is contained in:
2025-12-24 17:05:16 +07:00
parent 423a68f410
commit 9072f84681
16 changed files with 389 additions and 133 deletions

17
src/app/[slug]/page.tsx Normal file
View File

@@ -0,0 +1,17 @@
'use client';
import { useParams } from 'next/navigation';
import { productCategoryData } from '@/data/product/category';
// import component
import CategoryPage from '@components/layout/product/Category';
export default function DynamicPage() {
const params = useParams();
const slug = ('/' + params?.slug) as string;
if (productCategoryData.find((c) => c.current_category.url == slug)) {
return <CategoryPage slug={slug} />;
}
return <div>404 Không tìm thấy</div>;
}