Skip to content

Commit cb2c0b6

Browse files
committed
rmv obsolete telemetrybtn condition
1 parent 10a0ac6 commit cb2c0b6

File tree

2 files changed

+16
-41
lines changed

2 files changed

+16
-41
lines changed

src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/FixView.tsx

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ import {
1818
StepLink,
1919
} from "../../../../../../../functions/server/getRelevantGuidedSteps";
2020
import { useTelemetry } from "../../../../../../../hooks/useTelemetry";
21-
import { TelemetryButton } from "../../../../../../../components/client/TelemetryButton";
2221
import { FeatureFlagName } from "../../../../../../../../db/tables/featureFlags";
2322

2423
export 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-
}

src/app/components/client/FixNavigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const Steps = (props: {
8383
{label} {count > 0 && `(${count})`}
8484
</div>
8585
);
86+
8687
const dataBrokerStepCompleted = hasCompletedStepSection(props.data, "Scan");
8788

8889
return (

0 commit comments

Comments
 (0)