This commit is contained in:
2025-12-29 23:46:30 +07:00
parent bf063f244c
commit 9fa4b50b68
18 changed files with 1317 additions and 10 deletions

View File

@@ -1,9 +1,11 @@
'use client';
import { useParams } from 'next/navigation';
import NotFound from '../pages/404';
import { resolvePageType } from '@/lib/resolvePageType';
import CategoryPage from '@/components/Product/Category';
import ProductDetailPage from '@/components/Product/ProductDetail';
import { resolvePageType } from '@/lib/resolvePageType';
import ArticlePage from '@/components/Article';
export default function DynamicPage() {
const { slug } = useParams();
@@ -16,7 +18,9 @@ export default function DynamicPage() {
return <CategoryPage slug={fullSlug} />;
case 'product-detail':
return <ProductDetailPage slug={fullSlug} />;
case 'article-home':
return <ArticlePage />;
default:
return <div>404 Không tìm thấy</div>;
return <NotFound />;
}
}