update
This commit is contained in:
@@ -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 />;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user