From 5f6ef1da5bd5cefca4c45c48e0e3e41e8aef358f Mon Sep 17 00:00:00 2001 From: bc-victor <140021227+bc-victor@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:43:48 -0600 Subject: [PATCH] fix: removing channel id if it is setup to 1 (#850) --- .../storefront/src/components/B3StoreContainer.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/storefront/src/components/B3StoreContainer.tsx b/apps/storefront/src/components/B3StoreContainer.tsx index 029c0336..9a648b90 100644 --- a/apps/storefront/src/components/B3StoreContainer.tsx +++ b/apps/storefront/src/components/B3StoreContainer.tsx @@ -57,11 +57,15 @@ export default function B3StoreContainer(props: B3StoreContainerProps) { platform, translationVersion, } = storeInfo - - const bcUrl = - platform !== 'bigcommerce' - ? `https://store-${storeHash}-${channelId}.mybigcommerce.com` - : '' + let bcUrl = '' + + if (platform !== 'bigcommerce') { + if (channelId === 1) { + bcUrl = `https://store-${storeHash}.mybigcommerce.com` + } else { + bcUrl = `https://store-${storeHash}-${channelId}.mybigcommerce.com` + } + } const isEnabled = storeBasicInfo?.multiStorefrontEnabled ? storeEnabled : true