diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryPage.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryPage.tsx index ea9deb2caa..1c51441ef0 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryPage.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryPage.tsx @@ -95,10 +95,6 @@ const SummaryPage = ({ updatedResponseCount = await getResponseCountAction(surveyId, filters); } setResponseCount(updatedResponseCount); - if (updatedResponseCount === 0) { - setSurveySummary(initialSurveySummary); - return; - } let updatedSurveySummary; if (isSharingPage) { diff --git a/packages/lib/response/service.ts b/packages/lib/response/service.ts index db92620a76..72ec2d78a2 100644 --- a/packages/lib/response/service.ts +++ b/packages/lib/response/service.ts @@ -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, } )();