mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
Moved getAllProducts
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user