|
|
@@ -44,6 +44,7 @@ async function getSingleProduct(urlKey: string) {
|
|
|
|
|
|
return product;
|
|
|
} catch (error) {
|
|
|
+ console.log('getSingleProduct error ======= ', error)
|
|
|
if (error instanceof Error) {
|
|
|
console.error("Error fetching product:", {
|
|
|
message: error.message,
|
|
|
@@ -65,6 +66,7 @@ export default async function ProductPage({
|
|
|
const { urlProduct } = await params;
|
|
|
const fullPath = urlProduct.join("/");
|
|
|
const product = await getSingleProduct(fullPath);
|
|
|
+ console.log('ProductPage product +++++++++ ', product);
|
|
|
if (!product) return notFound();
|
|
|
|
|
|
// const imageUrl = getImageUrl(product?.baseImageUrl, baseUrl, NOT_IMAGE);
|