aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/hooks/order.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks/order.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/hooks/order.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/order.ts b/packages/merchant-backoffice-ui/src/hooks/order.ts
index a42d05966..e7a893f2c 100644
--- a/packages/merchant-backoffice-ui/src/hooks/order.ts
+++ b/packages/merchant-backoffice-ui/src/hooks/order.ts
@@ -150,7 +150,7 @@ export function useOrderDetails(
if (isValidating) return { loading: true, data: data?.data };
if (data) return data;
- if (error) return error.info;
+ if (error) return error.cause;
return { loading: true };
}
@@ -237,8 +237,8 @@ export function useInstanceOrders(
if (beforeData) setLastBefore(beforeData);
}, [afterData, beforeData]);
- if (beforeError) return beforeError.info;
- if (afterError) return afterError.info;
+ if (beforeError) return beforeError.cause;
+ if (afterError) return afterError.cause;
// if the query returns less that we ask, then we have reach the end or beginning
const isReachingEnd = afterData && afterData.data.orders.length < totalAfter;