Skip to content

Commit

Permalink
feat: detail getBcOrderStatusType
Browse files Browse the repository at this point in the history
  • Loading branch information
kris liu authored and kris-liu-smile committed Nov 22, 2022
1 parent eb81d66 commit 8a08a6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/storefront/src/pages/orderDetail/OrderDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getB2BOrderDetails,
getBCOrderDetails,
getOrderStatusType,
getBcOrderStatusType,
} from '@/shared/service/b2b'

import {
Expand Down Expand Up @@ -58,7 +59,6 @@ import {
OrderDetailsContext,
OrderDetailsProvider,
} from './context/OrderDetailsContext'
import getOrderStatus from '../order/shared/getOrderStatus'

interface LocationState {
isCompanyOrder: boolean,
Expand Down Expand Up @@ -133,9 +133,10 @@ const OrderDetail = () => {
}

const getOrderStatus = async () => {
const fn = isB2BUser ? getOrderStatusType : getBcOrderStatusType
const {
orderStatuses = [],
}: any = await getOrderStatusType()
}: any = await fn()

dispatch({
type: 'statusType',
Expand Down

0 comments on commit 8a08a6a

Please sign in to comment.