mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
Moved getSiteInfo
This commit is contained in:
@@ -7,7 +7,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'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
@@ -21,7 +20,7 @@ export async function getStaticProps({
|
||||
preview,
|
||||
})
|
||||
|
||||
const { categories, brands } = await getSiteInfo({ config, preview })
|
||||
const { categories, brands } = await commerce.getSiteInfo({ config, preview })
|
||||
const { pages } = await commerce.getAllPages({ config, preview })
|
||||
|
||||
return {
|
||||
|
@@ -10,7 +10,6 @@ import { Container, Grid, Skeleton } from '@components/ui'
|
||||
|
||||
import { getConfig } from '@framework/api'
|
||||
import useSearch from '@framework/product/use-search'
|
||||
import getSiteInfo from '@framework/common/get-site-info'
|
||||
import commerce from '@lib/api/commerce'
|
||||
import rangeMap from '@lib/range-map'
|
||||
|
||||
@@ -39,7 +38,7 @@ export async function getStaticProps({
|
||||
}: GetStaticPropsContext) {
|
||||
const config = getConfig({ locale })
|
||||
const { pages } = await commerce.getAllPages({ config, preview })
|
||||
const { categories, brands } = await getSiteInfo({ config, preview })
|
||||
const { categories, brands } = await commerce.getSiteInfo({ config, preview })
|
||||
return {
|
||||
props: {
|
||||
pages,
|
||||
|
Reference in New Issue
Block a user