Skip to content

Commit

Permalink
Ask VA/ 1475 update require sign in logic (#33003)
Browse files Browse the repository at this point in the history
* update logic for sign in modal on who is your question about page

* fix linting warnings
  • Loading branch information
ediiotero authored Nov 21, 2024
1 parent ae823f3 commit 011f139
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ const WhoIsYourQuestionAboutCustomPage = props => {
const [validationError, setValidationError] = useState(null);
const [showModal, setShowModal] = useState({ show: false, message: '' });

const caregiverSelected = {
category: 'Health care',
topic: 'Caregiver support program',
subtopic: 'Program of General Caregiver Support Services (PGCSS)',
};

const radioOptions = () => {
const labels = Object.values(whoIsYourQuestionAboutLabels);
const values = Object.keys(whoIsYourQuestionAboutLabels);
Expand Down Expand Up @@ -57,9 +51,6 @@ const WhoIsYourQuestionAboutCustomPage = props => {
const selectedValue = event.detail.value;
onChange({ ...formData, whoIsYourQuestionAbout: selectedValue });
if (
formData.selectCategory === caregiverSelected.category &&
formData.selectTopic === caregiverSelected.topic &&
formData.selectSubtopic === caregiverSelected.subtopic &&
!loggedIn &&
(selectedValue === whoIsYourQuestionAboutLabels.MYSELF ||
selectedValue === whoIsYourQuestionAboutLabels.SOMEONE_ELSE)
Expand Down Expand Up @@ -125,6 +116,11 @@ WhoIsYourQuestionAboutCustomPage.propTypes = {
loggedIn: PropTypes.bool,
value: PropTypes.string,
onChange: PropTypes.func,
goBack: PropTypes.func,
goToPath: PropTypes.func,
formData: PropTypes.shape({
whoIsYourQuestionAbout: PropTypes.string,
}),
};

function mapStateToProps(state) {
Expand Down

0 comments on commit 011f139

Please sign in to comment.