Skip to content

Commit

Permalink
fix: removing channel id if it is setup to 1 (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-victor authored Nov 15, 2023
1 parent 5ad183d commit 5f6ef1d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/storefront/src/components/B3StoreContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f6ef1d

Please sign in to comment.