diff --git a/pages/index.tsx b/pages/index.tsx index 3a466c606..93d452645 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -13,15 +13,19 @@ export async function getStaticProps({ locale, }: GetStaticPropsContext) { const config = getConfig({ locale }) - const { pages } = await getAllPages({ config, preview }) - const { categories } = await getSiteInfo({ config, preview }) + const pagesPromise = getAllPages({ config, preview }) + const siteInfoPromise = getSiteInfo({ config, preview }) - const { products } = await getAllProducts({ + const productsPromise = getAllProducts({ variables: { first: 12 }, config, preview, }) + const { pages } = await pagesPromise + const { categories } = await siteInfoPromise + const { products } = await productsPromise + return { props: { products,