Skip to content

Commit

Permalink
ApiClient config needs to be updated when cid is changed (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvuong authored Oct 25, 2022
1 parent 644643b commit 362eef3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/commerce-sdk-react/src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ const CommerceApiProvider = (props: CommerceApiProviderProps): ReactElement => {
shopperPromotions: new ShopperPromotions(config),
shopperSearch: new ShopperSearch(config)
}
}, [clientId, organizationId, shortCode, siteId, proxy, fetchOptions])
}, [
clientId,
organizationId,
shortCode,
siteId,
proxy,
fetchOptions,
headers?.['correlation-id']
])

const auth = useMemo(() => {
return new Auth({
Expand Down

0 comments on commit 362eef3

Please sign in to comment.