Skip to content

Commit

Permalink
feat: add function to set b2b token
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-marco authored and kris-liu-smile committed Jul 31, 2023
1 parent 9206cc9 commit e0071f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/storefront/src/components/HeadlessController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export default function HeadlessController({
logInWithStorefrontToken: (customerJWTToken: string) =>
getCurrentCustomerInfo(dispatch, customerJWTToken),
graphqlBCProxy: B3Request.graphqlBCProxy,
loginWithB2BStorefrontToken: (b2bStorefrontJWTToken: string) =>
B3SStorage.set('B3B2BToken', b2bStorefrontJWTToken),
},
shoppingList: {
addProductFromPage: () => {
Expand Down
1 change: 1 addition & 0 deletions apps/storefront/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ declare interface Window {
customerJWTToken: string
) => Promise<{ role: number; userType: string } | undefined>
graphqlBCProxy: typeof import('@/shared/service/request/b3Fetch').default.graphqlBCProxy
loginWithB2BStorefrontToken: (b2bStorefrontJWTToken: string) => void
}
shoppingList: {
addProductFromPage: () => void
Expand Down

0 comments on commit e0071f4

Please sign in to comment.