update 13/01
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// src/app/[slug]/page.tsx
|
||||
import { notFound } from "next/navigation";
|
||||
import { findBySlug } from "@/lib/slugMap";
|
||||
import { findBySlug } from "@/lib/slug/slugMap";
|
||||
|
||||
import ProductCategory from "@/components/product/Category";
|
||||
import ProductDetail from "@/components/product/ProductDetail";
|
||||
@@ -21,16 +21,16 @@ export default async function SlugPage({
|
||||
|
||||
switch (result.type) {
|
||||
case "product_category":
|
||||
return <ProductCategory data={result.data} />;
|
||||
return <ProductCategory slug={result.data} />;
|
||||
|
||||
case "product_detail":
|
||||
return <ProductDetail data={result.data} />;
|
||||
return <ProductDetail slug={result.data} />;
|
||||
|
||||
case "article_home":
|
||||
return <ArticleHome slug={slug} />;
|
||||
|
||||
case "article_category":
|
||||
return <ArticleCategory data={result.data} />;
|
||||
return <ArticleCategory slug={result.data} />;
|
||||
|
||||
case "article_detail":
|
||||
return <ArticleDetail slug={result.data.slug} />;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user