diff --git a/framework/module-data/index.ts b/framework/module-data/index.ts index a4cdf0ab6..2aa21539e 100644 --- a/framework/module-data/index.ts +++ b/framework/module-data/index.ts @@ -14,7 +14,7 @@ const allModules:any =[ * Find the data method for a module by module reference name. * @param moduleName */ -export const getModuleData = (moduleName:string):any => { +export default (moduleName:string):any => { const obj = allModules.find((m: { name: string }) => m.name.toLowerCase() === moduleName.toLowerCase()) if (!obj) return null return obj.init diff --git a/pages/[...slug].tsx b/pages/[...slug].tsx index 9c3ed723e..4e0aa9c10 100644 --- a/pages/[...slug].tsx +++ b/pages/[...slug].tsx @@ -16,7 +16,7 @@ import { defaultPageProps } from '@lib/defaults' import AgilityPage from "components/agility-global/AgilityPage" import { getConfig } from '@framework/api' import getProduct from '@framework/api/operations/get-product' -import { getModuleData } from "framework/module-data" +import getModuleData from "framework/module-data" import getAllProductPaths from '@framework/api/operations/get-all-product-paths' @@ -81,8 +81,10 @@ export async function getStaticProps({ preview, params, locale, locales, default return { props: { error: `Params: ${params}, Error: ${err}, Stack: ${st}`, - revalidate: 60000 - } + header: null, + agilityProps: null + }, + revalidate: 60000 } } } diff --git a/pages/api/bigcommerce/search-products.ts b/pages/api/bigcommerce/search-products.ts index 32356fde6..d5e738570 100644 --- a/pages/api/bigcommerce/search-products.ts +++ b/pages/api/bigcommerce/search-products.ts @@ -1,3 +1,5 @@ +export default {} + // import { NextApiRequest, NextApiResponse } from "next" // import getProducts from "../../shopify-api/get-products"