mirror of
https://github.com/vercel/commerce.git
synced 2025-09-08 00:40:15 +00:00
Moved getAllPages everywhere
This commit is contained in:
@@ -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: {
|
||||
|
Reference in New Issue
Block a user