From aad0a909ac9fe6c51de12f3986598260d80ce8b7 Mon Sep 17 00:00:00 2001 From: cond0r <1243434+cond0r@users.noreply.github.com> Date: Tue, 26 Jul 2022 09:24:25 +0300 Subject: [PATCH] Updates --- packages/bigcommerce/src/lib/normalize.ts | 2 +- packages/shopify/src/fetcher.ts | 2 +- packages/shopify/src/utils/index.ts | 6 ------ site/components/common/Head/Head.tsx | 2 +- .../product/ProductCustomFields/ProductCustomFields.tsx | 4 ++-- site/components/product/ProductSidebar/ProductSidebar.tsx | 2 +- site/components/product/context.tsx | 6 ++---- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/packages/bigcommerce/src/lib/normalize.ts b/packages/bigcommerce/src/lib/normalize.ts index 9bd17c060..3737a2043 100644 --- a/packages/bigcommerce/src/lib/normalize.ts +++ b/packages/bigcommerce/src/lib/normalize.ts @@ -50,7 +50,7 @@ export function normalizeProduct(productNode: any): Product { alt: altText, ...rest, })), - + // merge variant default image with product images ...productNode.variants?.edges ?.map(({ node: { defaultImage } }: any) => defaultImage diff --git a/packages/shopify/src/fetcher.ts b/packages/shopify/src/fetcher.ts index 0b5363cd7..f44266010 100644 --- a/packages/shopify/src/fetcher.ts +++ b/packages/shopify/src/fetcher.ts @@ -1,4 +1,4 @@ -import { Fetcher } from '@vercel/commerce/utils/types' +import type { Fetcher } from '@vercel/commerce/utils/types' import { API_TOKEN, API_URL } from './const' import { handleFetchResponse } from './utils/handle-fetch-response' diff --git a/packages/shopify/src/utils/index.ts b/packages/shopify/src/utils/index.ts index 2e0dd15b5..ad6a98e99 100644 --- a/packages/shopify/src/utils/index.ts +++ b/packages/shopify/src/utils/index.ts @@ -1,12 +1,6 @@ export { throwUserErrors } from './throw-user-errors' export { handleFetchResponse } from './handle-fetch-response' -export { - handleLogin, - handleAutomaticLogin, - handleAccountActivation, -} from './auth' - export * from './auth' export * from './cart' export * from './metafields' diff --git a/site/components/common/Head/Head.tsx b/site/components/common/Head/Head.tsx index 07f257567..7c9f5d972 100644 --- a/site/components/common/Head/Head.tsx +++ b/site/components/common/Head/Head.tsx @@ -10,7 +10,7 @@ const Head: VFC = () => { content="width=device-width, initial-scale=1" /> - {process.env.COMMERCE_PROVIDER === '@vercel/commerce-shopify' && ( + {process.env.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN && ( { return ( -