fixed campaign analyitics
This commit is contained in:
parent
7de980ba1b
commit
66f0f53d1e
2 changed files with 4 additions and 3 deletions
|
|
@ -246,7 +246,8 @@ export const useCampaignSubscriberActivity = (
|
||||||
page = 0,
|
page = 0,
|
||||||
pageSize = 25,
|
pageSize = 25,
|
||||||
searchTerm = '',
|
searchTerm = '',
|
||||||
activityType = 'all'
|
activityType = 'all',
|
||||||
|
tabValue
|
||||||
) => {
|
) => {
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: ['campaign-activity', campaignId, page, pageSize, searchTerm, activityType],
|
queryKey: ['campaign-activity', campaignId, page, pageSize, searchTerm, activityType],
|
||||||
|
|
@ -264,7 +265,7 @@ export const useCampaignSubscriberActivity = (
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
},
|
},
|
||||||
enabled: !!campaignId && tabValue === 2 // Only fetch when on the activity tab
|
enabled: !!campaignId && tabValue === 2
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ const CampaignAnalyticsPage = () => {
|
||||||
isLoading: activityLoading,
|
isLoading: activityLoading,
|
||||||
error: activityError
|
error: activityError
|
||||||
} = useCampaignSubscriberActivity(
|
} = useCampaignSubscriberActivity(
|
||||||
id, page, rowsPerPage, searchTerm, activityTypeFilter
|
id, page, rowsPerPage, searchTerm, activityTypeFilter, tabValue
|
||||||
);
|
);
|
||||||
|
|
||||||
// Export report mutation
|
// Export report mutation
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue