From 28b244760afb5fee9ba71779a9f1f5c38ec99fc7 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 11 Jan 2021 13:25:25 -0300 Subject: [PATCH] changes --- framework/bigcommerce/api/operations/get-all-products.ts | 4 ++-- framework/bigcommerce/api/operations/get-product.ts | 4 ++-- package.json | 2 +- pages/index2.tsx | 7 +++++++ yarn.lock | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 pages/index2.tsx diff --git a/framework/bigcommerce/api/operations/get-all-products.ts b/framework/bigcommerce/api/operations/get-all-products.ts index 599109a7d..534c20bfb 100644 --- a/framework/bigcommerce/api/operations/get-all-products.ts +++ b/framework/bigcommerce/api/operations/get-all-products.ts @@ -94,7 +94,7 @@ async function getAllProducts({ variables?: ProductVariables config?: BigcommerceConfig preview?: boolean -} = {}): Promise<{ products: Product[] }> { +} = {}): Promise<{ products: Product[] | any[] }> { config = getConfig(config) const locale = vars.locale || config.locale @@ -127,7 +127,7 @@ async function getAllProducts({ }) } - return { products: products.map(normalizeProduct) } + return { products } } export default getAllProducts diff --git a/framework/bigcommerce/api/operations/get-product.ts b/framework/bigcommerce/api/operations/get-product.ts index 2476d1398..403208264 100644 --- a/framework/bigcommerce/api/operations/get-product.ts +++ b/framework/bigcommerce/api/operations/get-product.ts @@ -93,7 +93,7 @@ async function getProduct({ variables: ProductVariables config?: BigcommerceConfig preview?: boolean -}): Promise { +}): Promise { config = getConfig(config) const locale = vars.locale || config.locale @@ -111,7 +111,7 @@ async function getProduct({ setProductLocaleMeta(product) } - return { product: normalizeProduct(product) } + return { product } } return {} diff --git a/package.json b/package.json index b90bf4cf8..d1f669a36 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "lodash.debounce": "^4.0.8", "lodash.random": "^3.2.0", "lodash.throttle": "^4.1.1", - "next": "^10.0.5-canary.11", + "next": "^10.0.5", "next-seo": "^4.11.0", "next-themes": "^0.0.4", "postcss-nesting": "^7.0.1", diff --git a/pages/index2.tsx b/pages/index2.tsx new file mode 100644 index 000000000..9b94444e1 --- /dev/null +++ b/pages/index2.tsx @@ -0,0 +1,7 @@ +import { Layout } from '@components/common' + +export default function Home() { + return <>Hello +} + +Home.Layout = Layout diff --git a/yarn.lock b/yarn.lock index 8e9ded267..769c2e077 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5038,7 +5038,7 @@ next-unused@^0.0.3: madge "^3.8.0" ts-loader "^7.0.0" -next@^10.0.5-canary.11: +next@^10.0.5: version "10.0.5" resolved "https://registry.yarnpkg.com/next/-/next-10.0.5.tgz#8071e0aa1883266c91943aa7c6b73deadb064793" integrity sha512-yr7ap2TLugf0aMHz+3JoKFP9CCkFE+k6jCfdUymORhptjLYZbD3YGlTcUC1CRl+b5Phlbl7m/WUIPde0VcguiA==