Skip to content

Commit

Permalink
fix: sign in issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and CarlLiu2023 committed Jun 6, 2023
1 parent f677f40 commit 7fdef73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions apps/storefront/src/pages/order/Order.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ function Order({ isCompanyOrder = false }: OrderProps) {
useEffect(() => {
const search = getInitFilter(isCompanyOrder, isB2BUser)
setFilterData(search)
if (role === 100) return

const initFilter = async () => {
const companyId = companyB2BId || salesRepCompanyId
let createdByUsers: CustomFieldItems = {}
Expand Down
6 changes: 3 additions & 3 deletions packages/hooks/useB3AppOpen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export const useB3AppOpen = (initOpenState: OpenPageState) => {

const getCurrentLoginUrl = (href: string): string => {
let url = '/login'
if (href.includes('logout')) {
if (href?.includes('logout')) {
url = '/login?loginFlag=3'
}
if (href.includes('create_account')) {
if (href?.includes('create_account')) {
url = '/registered'
}

Expand Down Expand Up @@ -83,7 +83,7 @@ export const useB3AppOpen = (initOpenState: OpenPageState) => {
window.b2bStorefrontApp.isInit = true

window.addEventListener('click', handleTriggerClick, {
capture: false,
capture: true,
})
return () => {
window.removeEventListener('click', handleTriggerClick)
Expand Down

0 comments on commit 7fdef73

Please sign in to comment.