mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
fixes
This commit is contained in:
parent
e836a5950f
commit
b2d078a37f
@ -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
|
||||
|
@ -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,10 +81,12 @@ export async function getStaticProps({ preview, params, locale, locales, default
|
||||
return {
|
||||
props: {
|
||||
error: `Params: ${params}, Error: ${err}, Stack: ${st}`,
|
||||
header: null,
|
||||
agilityProps: null
|
||||
},
|
||||
revalidate: 60000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function getStaticPaths({ defaultLocale, locales }: GetStaticPathsContext) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
export default {}
|
||||
|
||||
// import { NextApiRequest, NextApiResponse } from "next"
|
||||
// import getProducts from "../../shopify-api/get-products"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user