mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-23 10:09:20 -06:00
fix: display count in summary only updating with new response (#2524)
This commit is contained in:
@@ -95,10 +95,6 @@ const SummaryPage = ({
|
||||
updatedResponseCount = await getResponseCountAction(surveyId, filters);
|
||||
}
|
||||
setResponseCount(updatedResponseCount);
|
||||
if (updatedResponseCount === 0) {
|
||||
setSurveySummary(initialSurveySummary);
|
||||
return;
|
||||
}
|
||||
|
||||
let updatedSurveySummary;
|
||||
if (isSharingPage) {
|
||||
|
||||
@@ -27,6 +27,7 @@ import { TSurveySummary } from "@formbricks/types/surveys";
|
||||
import { TTag } from "@formbricks/types/tags";
|
||||
|
||||
import { ITEMS_PER_PAGE, SERVICES_REVALIDATION_INTERVAL, WEBAPP_URL } from "../constants";
|
||||
import { displayCache } from "../display/cache";
|
||||
import { deleteDisplayByResponseId, getDisplayCountBySurveyId } from "../display/service";
|
||||
import { createPerson, getPerson, getPersonByUserId, transformPrismaPerson } from "../person/service";
|
||||
import {
|
||||
@@ -632,7 +633,7 @@ export const getSurveySummary = (
|
||||
},
|
||||
[`getSurveySummary-${surveyId}-${JSON.stringify(filterCriteria)}`],
|
||||
{
|
||||
tags: [responseCache.tag.bySurveyId(surveyId)],
|
||||
tags: [responseCache.tag.bySurveyId(surveyId), displayCache.tag.bySurveyId(surveyId)],
|
||||
revalidate: SERVICES_REVALIDATION_INTERVAL,
|
||||
}
|
||||
)();
|
||||
|
||||
Reference in New Issue
Block a user