Refine seller dashboard chart
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m24s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m24s
This commit is contained in:
@@ -176,7 +176,12 @@ export const fetchDashboardAnalytics = async (dateRange: DateRange, options?: Ca
|
||||
...options,
|
||||
shouldCache: (data) => {
|
||||
const metrics = data as DashboardAnalytics | null;
|
||||
return Boolean(metrics && Array.isArray(metrics.revenueBySeller) && Array.isArray(metrics.ordersBySeller));
|
||||
return Boolean(
|
||||
metrics &&
|
||||
Array.isArray(metrics.revenueBySeller) &&
|
||||
Array.isArray(metrics.ordersBySeller) &&
|
||||
Array.isArray(metrics.sellerRevenueByDate)
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user