@@ -19,6 +19,7 @@ interface SurveysCompletedProps {
19
19
20
20
const SurveysCompleted = ( { engagement, engagementIsLoading } : SurveysCompletedProps ) => {
21
21
const [ data , setData ] = useState < AggregatorData | null > ( null ) ;
22
+ const [ emailVerificationData , setEmailVerificationData ] = useState < AggregatorData | null > ( null ) ;
22
23
const [ isLoading , setIsLoading ] = useState ( true ) ;
23
24
const [ isError , setIsError ] = useState ( false ) ;
24
25
const isTablet = useMediaQuery ( ( theme : Theme ) => theme . breakpoints . down ( 'md' ) ) ;
@@ -40,6 +41,11 @@ const SurveysCompleted = ({ engagement, engagementIsLoading }: SurveysCompletedP
40
41
count_for : 'survey_completed' ,
41
42
} ) ;
42
43
setData ( response ) ;
44
+ const emailVerification = await getAggregatorData ( {
45
+ engagement_id : Number ( engagement . id ) ,
46
+ count_for : 'email_verification' ,
47
+ } ) ;
48
+ setEmailVerificationData ( emailVerification ) ;
43
49
} catch ( error ) {
44
50
if ( axios . isAxiosError ( error ) ) {
45
51
setErrors ( error ) ;
@@ -113,9 +119,14 @@ const SurveysCompleted = ({ engagement, engagementIsLoading }: SurveysCompletedP
113
119
barSize = { circleSize / 4 }
114
120
data = { [ data ] }
115
121
startAngle = { 225 }
116
- endAngle = { - 270 }
122
+ endAngle = { - 225 }
117
123
>
118
- < PolarAngleAxis type = "number" domain = { [ 0 , 100 ] } angleAxisId = { 0 } tick = { false } />
124
+ < PolarAngleAxis
125
+ type = "number"
126
+ domain = { [ 0 , emailVerificationData ?. value ] }
127
+ angleAxisId = { 0 }
128
+ tick = { false }
129
+ />
119
130
< RadialBar
120
131
background = { { fill : DASHBOARD . KPI . RADIALBAR . BACKGROUND_COLOR } }
121
132
dataKey = "value"
0 commit comments