From 10e3dd37db0b06e56b061c409cf40f5f4312e55e Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 6 Oct 2023 12:46:13 +0545 Subject: [PATCH] fix drop off calculation --- .../(analysis)/summary/components/SummaryMetadata.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryMetadata.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryMetadata.tsx index 7a4dcc7b5e..38c3d739ec 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryMetadata.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/summary/components/SummaryMetadata.tsx @@ -58,9 +58,9 @@ export default function SummaryMetadata({ responses, survey }: SummaryMetadataPr /> - : totalDisplays - completedResponses} - tooltipText="People who started but did not complete the survey" + percentage={`${Math.round(((totalResponses - completedResponses) / totalResponses) * 100)}%`} + value={responses.length === 0 ? - : totalResponses - completedResponses} + tooltipText="People who started but not completed the survey." />