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.
|
* Find the data method for a module by module reference name.
|
||||||
* @param moduleName
|
* @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())
|
const obj = allModules.find((m: { name: string }) => m.name.toLowerCase() === moduleName.toLowerCase())
|
||||||
if (!obj) return null
|
if (!obj) return null
|
||||||
return obj.init
|
return obj.init
|
||||||
|
@ -16,7 +16,7 @@ import { defaultPageProps } from '@lib/defaults'
|
|||||||
import AgilityPage from "components/agility-global/AgilityPage"
|
import AgilityPage from "components/agility-global/AgilityPage"
|
||||||
import { getConfig } from '@framework/api'
|
import { getConfig } from '@framework/api'
|
||||||
import getProduct from '@framework/api/operations/get-product'
|
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'
|
import getAllProductPaths from '@framework/api/operations/get-all-product-paths'
|
||||||
|
|
||||||
@ -81,11 +81,13 @@ export async function getStaticProps({ preview, params, locale, locales, default
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
error: `Params: ${params}, Error: ${err}, Stack: ${st}`,
|
error: `Params: ${params}, Error: ${err}, Stack: ${st}`,
|
||||||
|
header: null,
|
||||||
|
agilityProps: null
|
||||||
|
},
|
||||||
revalidate: 60000
|
revalidate: 60000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export async function getStaticPaths({ defaultLocale, locales }: GetStaticPathsContext) {
|
export async function getStaticPaths({ defaultLocale, locales }: GetStaticPathsContext) {
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
export default {}
|
||||||
|
|
||||||
// import { NextApiRequest, NextApiResponse } from "next"
|
// import { NextApiRequest, NextApiResponse } from "next"
|
||||||
// import getProducts from "../../shopify-api/get-products"
|
// import getProducts from "../../shopify-api/get-products"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user