Limit RFV history query to period buyers
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m2s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m2s
This commit is contained in:
@@ -83,12 +83,14 @@ const Clients = () => {
|
||||
let isMounted = true;
|
||||
|
||||
const loadClients = async () => {
|
||||
const [clientsData, rfmData] = await Promise.all([
|
||||
fetchClientAnalytics(dateRange),
|
||||
fetchRfmAnalytics(dateRange)
|
||||
]);
|
||||
const clientsData = await fetchClientAnalytics(dateRange);
|
||||
if (isMounted) {
|
||||
setClientAnalytics(clientsData);
|
||||
setRfmAnalytics(null);
|
||||
}
|
||||
|
||||
const rfmData = await fetchRfmAnalytics(dateRange);
|
||||
if (isMounted) {
|
||||
setRfmAnalytics(rfmData);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user