Skip to content

Commit

Permalink
Add page details and categories and brands
Browse files Browse the repository at this point in the history
  • Loading branch information
tedraykov committed Jul 2, 2021
1 parent b467bf3 commit 0d2b9e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion framework/reactioncommerce/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const commerce = require('./commerce.config.json')
module.exports = {
commerce,
images: {
domains: ['94.155.79.88'],
domains: ['api.treble.bg'],
},
}
12 changes: 7 additions & 5 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
}
Expand Down

0 comments on commit 0d2b9e2

Please sign in to comment.