mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
parallel requests
This commit is contained in:
parent
c1dd44964f
commit
993525c553
@ -9,8 +9,10 @@ export async function getSearchStaticProps({
|
|||||||
locale,
|
locale,
|
||||||
}: GetStaticPropsContext) {
|
}: GetStaticPropsContext) {
|
||||||
const config = getConfig({ locale })
|
const config = getConfig({ locale })
|
||||||
const { pages } = await getAllPages({ config, preview })
|
const pagesPromise = getAllPages({ config, preview })
|
||||||
const { categories, brands } = await getSiteInfo({ config, preview })
|
const siteInfoPromise = getSiteInfo({ config, preview })
|
||||||
|
const { pages } = await pagesPromise
|
||||||
|
const { categories, brands } = await siteInfoPromise
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
pages,
|
pages,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user