Skip to content

Commit

Permalink
[FSR] 95102 - Hiding wizard link on intro page with feature flag #32789
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Pongo authored Oct 31, 2024
1 parent f9555dd commit da9e6d3
Showing 1 changed file with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { focusElement } from 'platform/utilities/ui';
import FormTitle from 'platform/forms-system/src/js/components/FormTitle';
import SaveInProgressIntro from 'platform/forms/save-in-progress/SaveInProgressIntro';
import recordEvent from 'platform/monitoring/record-event';
import { useFeatureToggle } from 'platform/utilities/feature-toggles';
import formConfig from '../config/form';
import UnverifiedPrefillAlert from '../components/shared/UnverifiedPrefillAlert';
import { WIZARD_STATUS } from '../wizard/constants';
Expand All @@ -17,6 +18,11 @@ const IntroductionPage = ({ route, formId }) => {
clearJobIndex();
}, []);

const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
const showWizard = useToggleValue(
TOGGLE_NAMES.showFinancialStatusReportWizard,
);

return (
<div className="fsr-introduction schemaform-intro">
<FormTitle
Expand All @@ -40,20 +46,22 @@ const IntroductionPage = ({ route, formId }) => {
<h2 className="vads-u-font-size--h3">
Follow these steps to request help
</h2>
<p>
If you don’t think this is the right form for you,
<a
href={manifest.rootUrl}
onClick={() => {
sessionStorage.removeItem(WIZARD_STATUS);
recordEvent({ event: 'howToWizard-start-over' });
}}
className="vads-u-margin-left--0p5"
>
go back and answer questions again
</a>
.
</p>
{showWizard ? (
<p>
If you don’t think this is the right form for you,
<a
href={manifest.rootUrl}
onClick={() => {
sessionStorage.removeItem(WIZARD_STATUS);
recordEvent({ event: 'howToWizard-start-over' });
}}
className="vads-u-margin-left--0p5"
>
go back and answer questions again
</a>
.
</p>
) : null}
<va-process-list class="vads-u-margin-left--neg2 vads-u-padding-bottom--0">
<va-process-list-item header="Prepare">
<p>
Expand Down

0 comments on commit da9e6d3

Please sign in to comment.