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,
|
||||
}: GetStaticPropsContext) {
|
||||
const config = getConfig({ locale })
|
||||
const { pages } = await getAllPages({ config, preview })
|
||||
const { categories, brands } = await getSiteInfo({ config, preview })
|
||||
const pagesPromise = getAllPages({ config, preview })
|
||||
const siteInfoPromise = getSiteInfo({ config, preview })
|
||||
const { pages } = await pagesPromise
|
||||
const { categories, brands } = await siteInfoPromise
|
||||
return {
|
||||
props: {
|
||||
pages,
|
||||
|
Loading…
x
Reference in New Issue
Block a user