fixed campaign analyitics

This commit is contained in:
2ManyProjects 2025-05-01 21:56:35 -05:00
parent 7de980ba1b
commit 66f0f53d1e
2 changed files with 4 additions and 3 deletions

View file

@ -246,7 +246,8 @@ export const useCampaignSubscriberActivity = (
page = 0,
pageSize = 25,
searchTerm = '',
activityType = 'all'
activityType = 'all',
tabValue
) => {
return useQuery({
queryKey: ['campaign-activity', campaignId, page, pageSize, searchTerm, activityType],
@ -264,7 +265,7 @@ export const useCampaignSubscriberActivity = (
);
return response.data;
},
enabled: !!campaignId && tabValue === 2 // Only fetch when on the activity tab
enabled: !!campaignId && tabValue === 2
});
};

View file

@ -90,7 +90,7 @@ const CampaignAnalyticsPage = () => {
isLoading: activityLoading,
error: activityError
} = useCampaignSubscriberActivity(
id, page, rowsPerPage, searchTerm, activityTypeFilter
id, page, rowsPerPage, searchTerm, activityTypeFilter, tabValue
);
// Export report mutation