Refine seller dashboard chart
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m24s

This commit is contained in:
Cauê Faleiros
2026-06-26 14:53:49 -03:00
parent 59fffa2018
commit 901752ebc5
6 changed files with 513 additions and 184 deletions

View File

@@ -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)
);
}
});
};