mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Use functions instead of a class
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next';
|
||||
import { commerce } from 'lib/commerce-api';
|
||||
import getAllProducts from 'lib/bigcommerce/api/operations/get-all-products';
|
||||
import { Layout } from '@components/core';
|
||||
|
||||
export async function getStaticProps({ preview }: GetStaticPropsContext) {
|
||||
const { products } = await commerce.getAllProducts();
|
||||
const { products } = await getAllProducts();
|
||||
|
||||
return {
|
||||
props: { products },
|
||||
|
Reference in New Issue
Block a user