From 0d2b9e2bb3eb00003815a8f9ff5df34652645e89 Mon Sep 17 00:00:00 2001 From: tedraykov Date: Fri, 2 Jul 2021 19:15:44 +0300 Subject: [PATCH] Add page details and categories and brands --- framework/reactioncommerce/next.config.js | 2 +- pages/index.tsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/framework/reactioncommerce/next.config.js b/framework/reactioncommerce/next.config.js index f1750231..d93a9b4c 100644 --- a/framework/reactioncommerce/next.config.js +++ b/framework/reactioncommerce/next.config.js @@ -3,6 +3,6 @@ const commerce = require('./commerce.config.json') module.exports = { commerce, images: { - domains: ['94.155.79.88'], + domains: ['api.treble.bg'], }, } diff --git a/pages/index.tsx b/pages/index.tsx index e884ffc5..4e3335e5 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -5,6 +5,8 @@ import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next' import { getConfig } from '@framework/api' import getAllProducts from '@framework/product/get-all-products' +import getAllPages from '@framework/common/get-all-pages' +import getSiteInfo from '@framework/common/get-site-info' export async function getStaticProps({ preview, @@ -18,15 +20,15 @@ export async function getStaticProps({ preview, }) - // const { categories, brands } = await getSiteInfo({ config, preview }) - // const { pages } = await getAllPages({ config, preview }) + const { categories, brands } = await getSiteInfo({ config, preview }) + const { pages } = await getAllPages({ config, preview }) return { props: { products, - categories: [], - brands: [], - pages: [], + categories, + brands, + pages, }, revalidate: 14400, }