Moved getAllProducts

This commit is contained in:
Luis Alvarez
2021-05-24 17:22:46 -05:00
parent c2a5904e01
commit be5d47bac3
11 changed files with 209 additions and 155 deletions

View File

@@ -6,7 +6,6 @@ import { ProductCard } from '@components/product'
import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
import { getConfig } from '@framework/api'
import getAllProducts from '@framework/product/get-all-products'
export async function getStaticProps({
preview,
@@ -14,7 +13,7 @@ export async function getStaticProps({
}: GetStaticPropsContext) {
const config = getConfig({ locale })
const { products } = await getAllProducts({
const { products } = await commerce.getAllProducts({
variables: { first: 12 },
config,
preview,