@@ -18,14 +18,13 @@ import {
1818 StepLink ,
1919} from "../../../../../../../functions/server/getRelevantGuidedSteps" ;
2020import { useTelemetry } from "../../../../../../../hooks/useTelemetry" ;
21- import { TelemetryButton } from "../../../../../../../components/client/TelemetryButton" ;
2221import { FeatureFlagName } from "../../../../../../../../db/tables/featureFlags" ;
2322
2423export type FixViewProps = {
2524 children : ReactNode ;
2625 subscriberEmails : string [ ] ;
2726 data : StepDeterminationData ;
28- nextStep : StepLink | ( ( ) => void ) ;
27+ nextStep : StepLink ;
2928 currentSection :
3029 | "data-broker-profiles"
3130 | "high-risk-data-breach"
@@ -93,47 +92,22 @@ export const FixView = (props: FixViewProps) => {
9392 { ! props . hideNavClose && navigationClose ( ) }
9493 < section className = { styles . fixSection } >
9594 < div className = { styles . viewWrapper } > { props . children } </ div >
96- { ! props . hideNextNavigationRightArrow &&
97- ( isNextStepALink ( props . nextStep ) ? (
98- < Link
99- className = { `${ styles . navArrow } ${ styles . navArrowNext } ` }
100- href = { props . nextStep . href }
101- aria-label = { l10n . getString ( "guided-resolution-flow-next-arrow" ) }
102- onClick = { ( ) => {
103- recordTelemetry ( "button" , "click" , {
104- button_id : "next_arrow" ,
105- } ) ;
106- } }
107- >
108- < Image alt = "" src = { ImageArrowRight } />
109- </ Link >
110- ) : (
111- < TelemetryButton
112- className = { `${ styles . navArrow } ${ styles . navArrowNext } ` }
113- event = { {
114- module : "button" ,
115- name : "click" ,
116- data : {
117- button_id : "go_to_next_result" ,
118- } ,
119- } }
120- variant = "link"
121- onPress = { props . nextStep }
122- aria-label = { l10n . getString (
123- "guided-resolution-flow-next-arrow-sub-step" ,
124- ) }
125- >
126- < Image alt = "" src = { ImageArrowRight } />
127- </ TelemetryButton >
128- ) ) }
95+ { ! props . hideNextNavigationRightArrow && (
96+ < Link
97+ className = { `${ styles . navArrow } ${ styles . navArrowNext } ` }
98+ href = { props . nextStep . href }
99+ aria-label = { l10n . getString ( "guided-resolution-flow-next-arrow" ) }
100+ onClick = { ( ) => {
101+ recordTelemetry ( "button" , "click" , {
102+ button_id : "next_arrow" ,
103+ } ) ;
104+ } }
105+ >
106+ < Image alt = "" src = { ImageArrowRight } />
107+ </ Link >
108+ ) }
129109 </ section >
130110 </ div >
131111 </ div >
132112 ) ;
133113} ;
134-
135- function isNextStepALink (
136- nextStep : StepLink | ( ( ) => void ) ,
137- ) : nextStep is StepLink {
138- return "href" in nextStep ;
139- }
0 commit comments