Moved getAllPages everywhere

This commit is contained in:
Luis Alvarez
2021-05-21 15:06:21 -05:00
parent 066a53d52d
commit 9794d5e626
8 changed files with 24 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
import commerce from '@lib/api/commerce'
import { Layout } from '@components/common'
import { Grid, Marquee, Hero } from '@components/ui'
import { ProductCard } from '@components/product'
@@ -7,7 +8,6 @@ import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import { getConfig } from '@framework/api'
import getAllProducts from '@framework/product/get-all-products'
import getSiteInfo from '@framework/common/get-site-info'
import getAllPages from '@framework/common/get-all-pages'
export async function getStaticProps({
preview,
@@ -22,7 +22,7 @@ export async function getStaticProps({
})
const { categories, brands } = await getSiteInfo({ config, preview })
const { pages } = await getAllPages({ config, preview })
const { pages } = await commerce.getAllPages({ config, preview })
return {
props: {