This commit is contained in:
Joel Varty
2021-06-21 15:55:31 -04:00
parent 7cc26439f4
commit 206d221f34
29 changed files with 827 additions and 449 deletions

View File

@@ -12,7 +12,8 @@ import { getAgilityPageProps, getAgilityPaths } from "@agility/nextjs/node"
import { handlePreview } from "@agility/nextjs"
import AgilityPage from "components/agility-global/AgilityPage"
import getModuleData from "framework/module-data"
import getModuleData from "@lib/module-data"
import SiteData from '@lib/global-data/SiteData'
export async function getStaticProps({ preview, params, locale, locales, defaultLocale }: GetStaticPropsContext<{ slug: string[] }>) {
@@ -26,15 +27,13 @@ export async function getStaticProps({ preview, params, locale, locales, default
params.slug[1] = "product-details"
}
//add any global components (header, footer) that need agility data here
//add any global data accessor here
const globalComponents = {
// "header": GlobalHeader,
// "footer": GlobalFooter
"sitedata": SiteData
}
const agilityProps = await getAgilityPageProps({ preview, params, locale, getModule: getModuleData, defaultLocale, globalComponents });
let rebuildFrequency = 10
let productDetail: any = null