diff --git a/src/applications/ask-va/components/BreadCrumbs.jsx b/src/applications/ask-va/components/BreadCrumbs.jsx index 4a9b7c6910f1..db0f8920f101 100644 --- a/src/applications/ask-va/components/BreadCrumbs.jsx +++ b/src/applications/ask-va/components/BreadCrumbs.jsx @@ -17,7 +17,7 @@ const BreadCrumbs = ({ currentLocation }) => { const breadcrumbLinks = breadcrumbsDictionary[adjustedLocation]; return ( - + {breadcrumbLinks.map(link => ( {link.title} diff --git a/src/applications/debt-letters/components/DebtDetails.jsx b/src/applications/debt-letters/components/DebtDetails.jsx index c89018a54f71..9242d8044ff0 100644 --- a/src/applications/debt-letters/components/DebtDetails.jsx +++ b/src/applications/debt-letters/components/DebtDetails.jsx @@ -57,7 +57,7 @@ const DebtDetails = ({ selectedDebt, debts }) => { return (
- + Home Manage your VA debt Your VA debt diff --git a/src/applications/debt-letters/components/DebtLettersDownload.jsx b/src/applications/debt-letters/components/DebtLettersDownload.jsx index 3b3281780117..147e196fa290 100644 --- a/src/applications/debt-letters/components/DebtLettersDownload.jsx +++ b/src/applications/debt-letters/components/DebtLettersDownload.jsx @@ -24,7 +24,7 @@ const DebtLettersDownload = ({ return (
- + Home Manage your VA debt Your debt diff --git a/src/applications/debt-letters/components/DebtLettersSummary.jsx b/src/applications/debt-letters/components/DebtLettersSummary.jsx index 49d5659c9749..97bca7769815 100644 --- a/src/applications/debt-letters/components/DebtLettersSummary.jsx +++ b/src/applications/debt-letters/components/DebtLettersSummary.jsx @@ -112,7 +112,7 @@ const DebtLettersSummary = ({ isError, isVBMSError, debts, debtLinks }) => { return ( <> - + Home Manage your VA debt Your VA debt diff --git a/src/applications/disability-benefits/2346/containers/App.jsx b/src/applications/disability-benefits/2346/containers/App.jsx index b6442749e828..794bcc686d90 100644 --- a/src/applications/disability-benefits/2346/containers/App.jsx +++ b/src/applications/disability-benefits/2346/containers/App.jsx @@ -65,7 +65,7 @@ class App extends Component { <> {!featureToggles.loading && (
- + Home {/* this will get updated when this route is added */} Health care @@ -80,13 +80,11 @@ class App extends Component { Loading your information... )} - {isError && - !pending && - isLoggedIn && ( -
- -
- )} + {isError && !pending && isLoggedIn && ( +
+ +
+ )} {showMainContent && ( {children} @@ -108,7 +106,4 @@ const mapDispatchToProps = dispatch => ({ ...bindActionCreators({ fetchFormStatus }, dispatch), }); -export default connect( - mapStateToProps, - mapDispatchToProps, -)(App); +export default connect(mapStateToProps, mapDispatchToProps)(App); diff --git a/src/applications/education-letters/components/Layout.jsx b/src/applications/education-letters/components/Layout.jsx index 292dbc3b0d1f..156e2073253b 100644 --- a/src/applications/education-letters/components/Layout.jsx +++ b/src/applications/education-letters/components/Layout.jsx @@ -10,7 +10,7 @@ const Layout = ({ children, clsName = '', breadCrumbs = {} }) => { return ( <> - + Home Education and training {renderBreadCrumbs()} @@ -29,9 +29,9 @@ const Layout = ({ children, clsName = '', breadCrumbs = {} }) => { }; Layout.propTypes = { - clsName: PropTypes.string, - children: PropTypes.object, breadCrumbs: PropTypes.object, + children: PropTypes.object, + clsName: PropTypes.string, }; export default Layout; diff --git a/src/applications/enrollment-verification/components/EnrollmentVerificationBreadcrumbs.jsx b/src/applications/enrollment-verification/components/EnrollmentVerificationBreadcrumbs.jsx index d060dc38d4a6..cf3a23606702 100644 --- a/src/applications/enrollment-verification/components/EnrollmentVerificationBreadcrumbs.jsx +++ b/src/applications/enrollment-verification/components/EnrollmentVerificationBreadcrumbs.jsx @@ -52,5 +52,5 @@ export default function EnrollmentVerificationBreadcrumbs() { ); } - return {breadcrumbs}; + return {breadcrumbs}; } diff --git a/src/applications/fry-dea/containers/FryDeaApp.jsx b/src/applications/fry-dea/containers/FryDeaApp.jsx index 25cae75a403d..b9a90aeea3af 100644 --- a/src/applications/fry-dea/containers/FryDeaApp.jsx +++ b/src/applications/fry-dea/containers/FryDeaApp.jsx @@ -24,43 +24,40 @@ function FryDeaApp({ }) { const [fetchedVeterans, setFetchedVeterans] = useState(false); - useEffect( - () => { - if (!user.login.currentlyLoggedIn) { - return; - } + useEffect(() => { + if (!user.login.currentlyLoggedIn) { + return; + } - if (!fetchedVeterans) { - setFetchedVeterans(true); - getVeterans(); - } + if (!fetchedVeterans) { + setFetchedVeterans(true); + getVeterans(); + } - if ( - formData.showUpdatedFryDeaApp !== showUpdatedFryDeaApp || - formData.veterans !== veterans - ) { - setFormData({ - ...formData, - showUpdatedFryDeaApp, - veterans, - }); - } - }, - [ - fetchedVeterans, - formData, - getVeterans, - location.pathname, - setFormData, - showUpdatedFryDeaApp, - user.login.currentlyLoggedIn, - veterans, - ], - ); + if ( + formData.showUpdatedFryDeaApp !== showUpdatedFryDeaApp || + formData.veterans !== veterans + ) { + setFormData({ + ...formData, + showUpdatedFryDeaApp, + veterans, + }); + } + }, [ + fetchedVeterans, + formData, + getVeterans, + location.pathname, + setFormData, + showUpdatedFryDeaApp, + user.login.currentlyLoggedIn, + veterans, + ]); return ( <> - + Home Education and training @@ -98,7 +95,4 @@ const mapDispatchToProps = { getVeterans: fetchVeterans, }; -export default connect( - mapStateToProps, - mapDispatchToProps, -)(FryDeaApp); +export default connect(mapStateToProps, mapDispatchToProps)(FryDeaApp); diff --git a/src/applications/gi/components/GiBillBreadcrumbs.jsx b/src/applications/gi/components/GiBillBreadcrumbs.jsx index d59f37341608..6b2750733f14 100644 --- a/src/applications/gi/components/GiBillBreadcrumbs.jsx +++ b/src/applications/gi/components/GiBillBreadcrumbs.jsx @@ -47,7 +47,7 @@ const GiBillBreadcrumbs = () => { ); } - return {crumbs}; + return {crumbs}; }; export default GiBillBreadcrumbs; diff --git a/src/applications/health-care-supply-reordering/containers/App.jsx b/src/applications/health-care-supply-reordering/containers/App.jsx index 3594c38e7780..e6a2516c0520 100644 --- a/src/applications/health-care-supply-reordering/containers/App.jsx +++ b/src/applications/health-care-supply-reordering/containers/App.jsx @@ -63,7 +63,7 @@ class App extends Component { return ( <> {!featureToggles.loading && ( - + Home {/* this will get updated when this route is added */} Health care @@ -77,13 +77,11 @@ class App extends Component { Loading your information... )} - {isError && - !pending && - isLoggedIn && ( -
- -
- )} + {isError && !pending && isLoggedIn && ( +
+ +
+ )} {showMainContent && ( {children} @@ -105,7 +103,4 @@ const mapDispatchToProps = dispatch => ({ ...bindActionCreators({ fetchFormStatus }, dispatch), }); -export default connect( - mapStateToProps, - mapDispatchToProps, -)(App); +export default connect(mapStateToProps, mapDispatchToProps)(App); diff --git a/src/applications/medical-copays/components/AlertView.jsx b/src/applications/medical-copays/components/AlertView.jsx index ceecfe6eef26..ac85fc70b21f 100644 --- a/src/applications/medical-copays/components/AlertView.jsx +++ b/src/applications/medical-copays/components/AlertView.jsx @@ -37,7 +37,7 @@ const AlertView = ({ pathname, alertType, error, cdpToggle, hasDebts }) => { return ( <> - + Home Health care Pay your VA copay bill diff --git a/src/applications/medical-copays/containers/DetailPage.jsx b/src/applications/medical-copays/containers/DetailPage.jsx index 2285f4c1429c..71def8c0f2ee 100644 --- a/src/applications/medical-copays/containers/DetailPage.jsx +++ b/src/applications/medical-copays/containers/DetailPage.jsx @@ -33,19 +33,19 @@ const DetailPage = ({ match }) => { mcpHTMLStatementToggle(state), ); - useEffect( - () => { - if (!isCurrentBalance) { - setAlert('past-due-balance'); - } - scrollToTop(); - }, - [isCurrentBalance], - ); + useEffect(() => { + if (!isCurrentBalance) { + setAlert('past-due-balance'); + } + scrollToTop(); + }, [isCurrentBalance]); return ( <> - + Home Health care Pay your VA copay bill diff --git a/src/applications/medical-copays/containers/OverviewPage.jsx b/src/applications/medical-copays/containers/OverviewPage.jsx index 9499994f4091..29406f89519e 100644 --- a/src/applications/medical-copays/containers/OverviewPage.jsx +++ b/src/applications/medical-copays/containers/OverviewPage.jsx @@ -59,7 +59,7 @@ const OverviewPage = () => { return ( <>
- + Home Health care Pay your VA copay bill diff --git a/src/applications/mhv/secure-messaging/components/shared/SmBreadcrumbs.jsx b/src/applications/mhv/secure-messaging/components/shared/SmBreadcrumbs.jsx index ad8c570ceccf..316731aa59d1 100644 --- a/src/applications/mhv/secure-messaging/components/shared/SmBreadcrumbs.jsx +++ b/src/applications/mhv/secure-messaging/components/shared/SmBreadcrumbs.jsx @@ -26,99 +26,84 @@ const SmBreadcrumbs = () => { } } - const [locationBasePath, locationChildPath] = useMemo( - () => { - const pathElements = location.pathname.split('/'); - if (pathElements[0] === '') pathElements.shift(); - return pathElements; - }, - [location], - ); + const [locationBasePath, locationChildPath] = useMemo(() => { + const pathElements = location.pathname.split('/'); + if (pathElements[0] === '') pathElements.shift(); + return pathElements; + }, [location]); - useEffect( - () => { - checkScreenSize(); - }, - [isMobile], - ); + useEffect(() => { + checkScreenSize(); + }, [isMobile]); - useEffect( - () => { - if ( - `/${locationBasePath}/` === Constants.Paths.FOLDERS && - parseInt(locationChildPath, 10) < 1 - ) { - navigateToFolderByFolderId(locationChildPath, history); - } - }, - [locationBasePath, locationChildPath, history], - ); + useEffect(() => { + if ( + `/${locationBasePath}/` === Constants.Paths.FOLDERS && + parseInt(locationChildPath, 10) < 1 + ) { + navigateToFolderByFolderId(locationChildPath, history); + } + }, [locationBasePath, locationChildPath, history]); window.addEventListener('resize', checkScreenSize); - useEffect( - () => { - if (!locationBasePath) { - dispatch(setBreadcrumbs({}, location)); - return; - } + useEffect(() => { + if (!locationBasePath) { + dispatch(setBreadcrumbs({}, location)); + return; + } - const path = `/${locationBasePath}/`; + const path = `/${locationBasePath}/`; - if ( - [ - Constants.Paths.INBOX, - Constants.Paths.SENT, - Constants.Paths.DELETED, - Constants.Paths.DRAFTS, - ].includes(path) || - (path === Constants.Paths.FOLDERS && !locationChildPath) - ) { - dispatch(setBreadcrumbs(Constants.Breadcrumbs.MESSAGES, location)); - } else if (path === Constants.Paths.FOLDERS && locationChildPath) { - dispatch(setBreadcrumbs(Constants.Breadcrumbs.FOLDERS, location)); - } else if (path === Constants.Paths.COMPOSE) { - dispatch(setBreadcrumbs(Constants.Breadcrumbs.INBOX, location)); - } else if ( - path === - (Constants.Paths.MESSAGE_THREAD || - Constants.Paths.REPLY || - Constants.Paths.COMPOSE) && - activeFolder - ) { - dispatch( - setBreadcrumbs( - { - path: `${Constants.Paths.FOLDERS}${activeFolder.folderId}`, - label: `Back to ${ - activeFolder.folderId < 1 - ? activeFolder.name.toLowerCase() - : activeFolder.name - }`, - }, - location, - ), - ); - } - }, - [ - activeFolder, - dispatch, - location, - locationBasePath, - locationChildPath, - messageDetails?.subject, - ], - ); + if ( + [ + Constants.Paths.INBOX, + Constants.Paths.SENT, + Constants.Paths.DELETED, + Constants.Paths.DRAFTS, + ].includes(path) || + (path === Constants.Paths.FOLDERS && !locationChildPath) + ) { + dispatch(setBreadcrumbs(Constants.Breadcrumbs.MESSAGES, location)); + } else if (path === Constants.Paths.FOLDERS && locationChildPath) { + dispatch(setBreadcrumbs(Constants.Breadcrumbs.FOLDERS, location)); + } else if (path === Constants.Paths.COMPOSE) { + dispatch(setBreadcrumbs(Constants.Breadcrumbs.INBOX, location)); + } else if ( + path === + (Constants.Paths.MESSAGE_THREAD || + Constants.Paths.REPLY || + Constants.Paths.COMPOSE) && + activeFolder + ) { + dispatch( + setBreadcrumbs( + { + path: `${Constants.Paths.FOLDERS}${activeFolder.folderId}`, + label: `Back to ${ + activeFolder.folderId < 1 + ? activeFolder.name.toLowerCase() + : activeFolder.name + }`, + }, + location, + ), + ); + } + }, [ + activeFolder, + dispatch, + location, + locationBasePath, + locationChildPath, + messageDetails?.subject, + ]); - useEffect( - () => { - if (messageDetails && !activeFolder) { - dispatch(retrieveFolder(messageDetails?.threadFolderId)); - } - }, - [messageDetails, activeFolder, dispatch], - ); + useEffect(() => { + if (messageDetails && !activeFolder) { + dispatch(retrieveFolder(messageDetails?.threadFolderId)); + } + }, [messageDetails, activeFolder, dispatch]); const breadcrumbSize = () => { if (isMobile) { @@ -133,7 +118,11 @@ const SmBreadcrumbs = () => { !crumbs?.label ? 'breadcrumbs--hidden' : '' }`} > - + {crumbs && (
  • diff --git a/src/applications/my-education-benefits/containers/App.jsx b/src/applications/my-education-benefits/containers/App.jsx index 8a7f02a6f2a6..acc58a3ed9f6 100644 --- a/src/applications/my-education-benefits/containers/App.jsx +++ b/src/applications/my-education-benefits/containers/App.jsx @@ -71,297 +71,279 @@ export const App = ({ }, { passive: false }, ); - useEffect( - () => { - if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { - return; - } + useEffect(() => { + if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { + return; + } - if (!fetchedPersonalInfo || !fetchedContactInfo) { - setFetchedPersonalInfo(true); - setFetchedContactInfo(true); - getPersonalInfo(showMebEnhancements09); - } else if (!formData[formFields.claimantId] && claimantInfo?.claimantId) { - setFormData({ - ...formData, - ...claimantInfo, - }); - } - }, - [ - claimantInfo, - featureTogglesLoaded, - fetchedContactInfo, - fetchedPersonalInfo, - formData, - getPersonalInfo, - isLOA3, - isLoggedIn, - setFormData, - showMeb1990EZMaintenanceAlert, - showMebEnhancements09, - ], - ); + if (!fetchedPersonalInfo || !fetchedContactInfo) { + setFetchedPersonalInfo(true); + setFetchedContactInfo(true); + getPersonalInfo(showMebEnhancements09); + } else if (!formData[formFields.claimantId] && claimantInfo?.claimantId) { + setFormData({ + ...formData, + ...claimantInfo, + }); + } + }, [ + claimantInfo, + featureTogglesLoaded, + fetchedContactInfo, + fetchedPersonalInfo, + formData, + getPersonalInfo, + isLOA3, + isLoggedIn, + setFormData, + showMeb1990EZMaintenanceAlert, + showMebEnhancements09, + ]); - useEffect( - () => { - if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { - return; - } + useEffect(() => { + if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { + return; + } + + // the firstName check ensures that eligibility only gets called after we have obtained claimant info + // we need this to avoid a race condition when a user is being loaded freshly from VADIR on DGIB + if (firstName && !fetchedEligibility) { + setFetchedEligibility(true); + getEligibility(); + } else if (eligibility && !formData.eligibility) { + setFormData({ + ...formData, + eligibility, + }); + } - // the firstName check ensures that eligibility only gets called after we have obtained claimant info - // we need this to avoid a race condition when a user is being loaded freshly from VADIR on DGIB - if (firstName && !fetchedEligibility) { - setFetchedEligibility(true); - getEligibility(); - } else if (eligibility && !formData.eligibility) { - setFormData({ - ...formData, - eligibility, - }); + const { toursOfDuty } = formData; + const updatedToursOfDuty = toursOfDuty?.map(tour => { + const tourToCheck = tour; + if ( + (tourToCheck?.dateRange?.to && new Date(tourToCheck?.dateRange?.to)) > + new Date() || + tourToCheck?.dateRange?.to === '' || + tourToCheck?.dateRange?.to === null || + tourToCheck.dateRange.to === 'Invalid date' + ) { + tourToCheck.serviceCharacter = 'Not Applicable'; + tourToCheck.separationReason = 'Not Applicable'; } + return tourToCheck; + }); - const { toursOfDuty } = formData; - const updatedToursOfDuty = toursOfDuty?.map(tour => { - const tourToCheck = tour; - if ( - (tourToCheck?.dateRange?.to && new Date(tourToCheck?.dateRange?.to)) > - new Date() || - tourToCheck?.dateRange?.to === '' || - tourToCheck?.dateRange?.to === null || - tourToCheck.dateRange.to === 'Invalid date' - ) { - tourToCheck.serviceCharacter = 'Not Applicable'; - tourToCheck.separationReason = 'Not Applicable'; - } - return tourToCheck; + if (!duplicateArrays(updatedToursOfDuty, toursOfDuty)) { + setFormData({ + ...formData, + toursOfDuty: updatedToursOfDuty, }); + } + }, [ + eligibility, + featureTogglesLoaded, + fetchedEligibility, + firstName, + formData, + getEligibility, + isLOA3, + isLoggedIn, + setFormData, + showMebDgi40Features, + ]); - if (!duplicateArrays(updatedToursOfDuty, toursOfDuty)) { - setFormData({ - ...formData, - toursOfDuty: updatedToursOfDuty, - }); - } - }, - [ - eligibility, - featureTogglesLoaded, - fetchedEligibility, - firstName, - formData, - getEligibility, - isLOA3, - isLoggedIn, - setFormData, - showMebDgi40Features, - ], - ); + useEffect(() => { + if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { + return; + } + // the firstName check ensures that exclusion periods only gets called after we have obtained claimant info + // we need this to avoid a race condition when a user is being loaded freshly from VADIR on DGIB + if (mebExclusionPeriodEnabled && firstName && !fetchedExclusionPeriods) { + setFetchedExclusionPeriods(true); + getExclusionPeriods(); + } + if (exclusionPeriods && !formData.exclusionPeriods) { + const updatedFormData = { + ...formData, + mebExclusionPeriodEnabled, + exclusionPeriods, // Update form data with fetched exclusion periods + }; + setFormData(updatedFormData); + } + }, [ + mebExclusionPeriodEnabled, + fetchedExclusionPeriods, + firstName, + getExclusionPeriods, + exclusionPeriods, + formData, + setFormData, + isLoggedIn, + featureTogglesLoaded, + isLOA3, + ]); - useEffect( - () => { - if (!isLoggedIn || !featureTogglesLoaded || isLOA3 !== true) { - return; - } - // the firstName check ensures that exclusion periods only gets called after we have obtained claimant info - // we need this to avoid a race condition when a user is being loaded freshly from VADIR on DGIB - if (mebExclusionPeriodEnabled && firstName && !fetchedExclusionPeriods) { - setFetchedExclusionPeriods(true); - getExclusionPeriods(); - } - if (exclusionPeriods && !formData.exclusionPeriods) { - const updatedFormData = { - ...formData, - mebExclusionPeriodEnabled, - exclusionPeriods, // Update form data with fetched exclusion periods - }; - setFormData(updatedFormData); - } - }, - [ - mebExclusionPeriodEnabled, - fetchedExclusionPeriods, - firstName, - getExclusionPeriods, - exclusionPeriods, - formData, - setFormData, - isLoggedIn, - featureTogglesLoaded, - isLOA3, - ], - ); + useEffect(() => { + if (showMebDgi40Features !== formData.showMebDgi40Features) { + setFormData({ + ...formData, + showMebDgi40Features, + }); + } + if (showMebDgi42Features !== formData.showMebDgi42Features) { + setFormData({ + ...formData, + showMebDgi42Features, + }); + } + if ( + showMeb1990EZMaintenanceAlert !== formData.showMeb1990EZMaintenanceAlert + ) { + setFormData({ + ...formData, + showMeb1990EZMaintenanceAlert, + }); + } - useEffect( - () => { - if (showMebDgi40Features !== formData.showMebDgi40Features) { - setFormData({ - ...formData, - showMebDgi40Features, - }); - } - if (showMebDgi42Features !== formData.showMebDgi42Features) { - setFormData({ - ...formData, - showMebDgi42Features, - }); - } - if ( - showMeb1990EZMaintenanceAlert !== formData.showMeb1990EZMaintenanceAlert - ) { - setFormData({ - ...formData, - showMeb1990EZMaintenanceAlert, - }); - } + if ( + formData['view:phoneNumbers']?.mobilePhoneNumber?.phone && + formData?.email?.email && + !formData?.duplicateEmail && + !formData?.duplicatePhone && + formData?.showMebEnhancements08 + ) { + getDuplicateContactInfo( + [{ value: formData?.email?.email, dupe: '' }], + [ + { + value: formData['view:phoneNumbers']?.mobilePhoneNumber?.phone, + dupe: '', + }, + ], + ); + } - if ( - formData['view:phoneNumbers']?.mobilePhoneNumber?.phone && - formData?.email?.email && - !formData?.duplicateEmail && - !formData?.duplicatePhone && - formData?.showMebEnhancements08 - ) { - getDuplicateContactInfo( - [{ value: formData?.email?.email, dupe: '' }], - [ - { - value: formData['view:phoneNumbers']?.mobilePhoneNumber?.phone, - dupe: '', - }, - ], - ); - } + if ( + duplicateEmail?.length > 0 && + duplicateEmail !== formData?.duplicateEmail + ) { + setFormData({ + ...formData, + duplicateEmail, + }); + } - if ( - duplicateEmail?.length > 0 && - duplicateEmail !== formData?.duplicateEmail - ) { - setFormData({ - ...formData, - duplicateEmail, - }); - } + if ( + duplicatePhone?.length > 0 && + duplicatePhone !== formData?.duplicatePhone + ) { + setFormData({ + ...formData, + duplicatePhone, + }); + } - if ( - duplicatePhone?.length > 0 && - duplicatePhone !== formData?.duplicatePhone - ) { - setFormData({ - ...formData, - duplicatePhone, - }); - } + if (showMebEnhancements !== formData.showMebEnhancements) { + setFormData({ + ...formData, + showMebEnhancements, + }); + } + if (showMebEnhancements06 !== formData.showMebEnhancements06) { + setFormData({ + ...formData, + showMebEnhancements06, + }); + } - if (showMebEnhancements !== formData.showMebEnhancements) { - setFormData({ - ...formData, - showMebEnhancements, - }); - } - if (showMebEnhancements06 !== formData.showMebEnhancements06) { - setFormData({ - ...formData, - showMebEnhancements06, - }); - } + if (showMebEnhancements08 !== formData.showMebEnhancements08) { + setFormData({ + ...formData, + showMebEnhancements08, + }); + } - if (showMebEnhancements08 !== formData.showMebEnhancements08) { - setFormData({ - ...formData, - showMebEnhancements08, - }); - } + if (showMebEnhancements09 !== formData.showMebEnhancements09) { + setFormData({ + ...formData, + showMebEnhancements09, + }); + } - if (showMebEnhancements09 !== formData.showMebEnhancements09) { - setFormData({ - ...formData, - showMebEnhancements09, - }); - } + if ( + showMebServiceHistoryCategorizeDisagreement !== + formData.showMebServiceHistoryCategorizeDisagreement + ) { + setFormData({ + ...formData, + showMebServiceHistoryCategorizeDisagreement, + }); + } - if ( - showMebServiceHistoryCategorizeDisagreement !== - formData.showMebServiceHistoryCategorizeDisagreement - ) { - setFormData({ - ...formData, - showMebServiceHistoryCategorizeDisagreement, - }); - } + if (showDgiDirectDeposit1990EZ !== formData.showDgiDirectDeposit1990EZ) { + setFormData({ + ...formData, + showDgiDirectDeposit1990EZ, + }); + } - if (showDgiDirectDeposit1990EZ !== formData.showDgiDirectDeposit1990EZ) { - setFormData({ - ...formData, - showDgiDirectDeposit1990EZ, - }); - } + if (isLOA3 !== formData.isLOA3) { + setFormData({ + ...formData, + isLOA3, + }); + } + }, [ + formData, + isLOA3, + setFormData, + showDgiDirectDeposit1990EZ, + showMebDgi40Features, + showMebDgi42Features, + showMeb1990EZMaintenanceAlert, + showMebEnhancements, + showMebEnhancements06, + showMebEnhancements08, + showMebEnhancements09, + showMebServiceHistoryCategorizeDisagreement, + getDuplicateContactInfo, + duplicateEmail, + duplicatePhone, + ]); - if (isLOA3 !== formData.isLOA3) { - setFormData({ - ...formData, - isLOA3, - }); - } - }, - [ - formData, - isLOA3, - setFormData, - showDgiDirectDeposit1990EZ, - showMebDgi40Features, - showMebDgi42Features, - showMeb1990EZMaintenanceAlert, - showMebEnhancements, - showMebEnhancements06, - showMebEnhancements08, - showMebEnhancements09, - showMebServiceHistoryCategorizeDisagreement, - getDuplicateContactInfo, - duplicateEmail, - duplicatePhone, - ], - ); + useEffect(() => { + if (email && email !== formData?.email?.email) { + setFormData({ + ...formData, + email: { + ...formData?.email, + email, + }, + }); + } + }, [email, formData, setFormData]); - useEffect( - () => { - if (email && email !== formData?.email?.email) { - setFormData({ - ...formData, - email: { - ...formData?.email, - email, - }, - }); + useEffect(() => { + const fetchAndUpdateDirectDepositInfo = async () => { + if (showDgiDirectDeposit1990EZ && isLoggedIn && !fetchedDirectDeposit) { + await getDirectDeposit(); + setFetchedDirectDeposit(true); } - }, - [email, formData, setFormData], - ); - - useEffect( - () => { - const fetchAndUpdateDirectDepositInfo = async () => { - if (showDgiDirectDeposit1990EZ && isLoggedIn && !fetchedDirectDeposit) { - await getDirectDeposit(); - setFetchedDirectDeposit(true); - } - }; - fetchAndUpdateDirectDepositInfo(); - }, - [ - isLoggedIn, - featureTogglesLoaded, - isLOA3, - showDgiDirectDeposit1990EZ, - fetchedDirectDeposit, - getDirectDeposit, - setFetchedDirectDeposit, - ], - ); + }; + fetchAndUpdateDirectDepositInfo(); + }, [ + isLoggedIn, + featureTogglesLoaded, + isLOA3, + showDgiDirectDeposit1990EZ, + fetchedDirectDeposit, + getDirectDeposit, + setFetchedDirectDeposit, + ]); return ( <> - + Home Education and training @@ -435,7 +417,4 @@ const mapDispatchToProps = { getDuplicateContactInfo: fetchDuplicateContactInfo, }; -export default connect( - mapStateToProps, - mapDispatchToProps, -)(App); +export default connect(mapStateToProps, mapDispatchToProps)(App); diff --git a/src/applications/representatives/components/common/Breadcrumbs.jsx b/src/applications/representatives/components/common/Breadcrumbs.jsx index 2edb7743c1d1..899886f0105b 100644 --- a/src/applications/representatives/components/common/Breadcrumbs.jsx +++ b/src/applications/representatives/components/common/Breadcrumbs.jsx @@ -47,7 +47,7 @@ const Breadcrumbs = ({ pathname }) => { }); return ( - + {breadcrumbs.map(({ link, label }) => (
  • {label} diff --git a/src/applications/simple-forms/mock-alternate-header-21-0845/components/CustomHeader.jsx b/src/applications/simple-forms/mock-alternate-header-21-0845/components/CustomHeader.jsx index a0e48ecf19d9..247b616062e1 100644 --- a/src/applications/simple-forms/mock-alternate-header-21-0845/components/CustomHeader.jsx +++ b/src/applications/simple-forms/mock-alternate-header-21-0845/components/CustomHeader.jsx @@ -77,7 +77,7 @@ const CustomHeader = ({ formData, formConfig, currentLocation }) => { // With this custom header, breadcrumbs should not appear on the form pages. // However we still want to show them on the introduction page and review page. // Static breadcrumbs from content-build cannot be used with this custom header - + Home Authorize VA to release your information to a third-party source diff --git a/src/applications/static-pages/manage-va-debt/MangeVADebtCTA.jsx b/src/applications/static-pages/manage-va-debt/MangeVADebtCTA.jsx index 199ea546ccf9..9061e96165eb 100644 --- a/src/applications/static-pages/manage-va-debt/MangeVADebtCTA.jsx +++ b/src/applications/static-pages/manage-va-debt/MangeVADebtCTA.jsx @@ -6,7 +6,7 @@ const fsrUrl = getAppUrl('request-debt-help-form-5655'); const ManageVADebtCTA = () => ( <> - + Home Manage your VA debt diff --git a/src/applications/toe/containers/ToeApp.jsx b/src/applications/toe/containers/ToeApp.jsx index 0caca27ecc96..5b97b1d59124 100644 --- a/src/applications/toe/containers/ToeApp.jsx +++ b/src/applications/toe/containers/ToeApp.jsx @@ -31,101 +31,83 @@ function ToeApp({ const [fetchedUserInfo, setFetchedUserInfo] = useState(false); const [fetchedDirectDeposit, setFetchedDirectDeposit] = useState(false); - useEffect( - () => { - if (!user?.login?.currentlyLoggedIn) { - return; - } - if (!fetchedUserInfo) { - setFetchedUserInfo(true); - getPersonalInformation(); - } + useEffect(() => { + if (!user?.login?.currentlyLoggedIn) { + return; + } + if (!fetchedUserInfo) { + setFetchedUserInfo(true); + getPersonalInformation(); + } - if ( - !sponsors?.loadedFromSavedState && - isArray(sponsorsSavedState?.sponsors) - ) { - setFormData(mapFormSponsors(formData, sponsorsSavedState)); - } else if (sponsorsInitial && !sponsors) { - setFormData(mapFormSponsors(formData, sponsorsInitial)); - } - }, - [ - fetchedUserInfo, - formData, - getPersonalInformation, - user?.login?.currentlyLoggedIn, - setFormData, - sponsors, - sponsorsInitial, - sponsorsSavedState, - ], - ); + if ( + !sponsors?.loadedFromSavedState && + isArray(sponsorsSavedState?.sponsors) + ) { + setFormData(mapFormSponsors(formData, sponsorsSavedState)); + } else if (sponsorsInitial && !sponsors) { + setFormData(mapFormSponsors(formData, sponsorsInitial)); + } + }, [ + fetchedUserInfo, + formData, + getPersonalInformation, + user?.login?.currentlyLoggedIn, + setFormData, + sponsors, + sponsorsInitial, + sponsorsSavedState, + ]); - useEffect( - () => { - if (isLOA3 !== formData.isLOA3) { - setFormData({ - ...formData, - isLOA3, // ES6 Syntax - }); - } - }, - [formData, setFormData, isLOA3], - ); + useEffect(() => { + if (isLOA3 !== formData.isLOA3) { + setFormData({ + ...formData, + isLOA3, // ES6 Syntax + }); + } + }, [formData, setFormData, isLOA3]); - useEffect( - () => { - if (showMebEnhancements !== formData.showMebEnhancements) { - setFormData({ - ...formData, - showMebEnhancements, - }); - } - }, - [formData, setFormData, showMebEnhancements], - ); + useEffect(() => { + if (showMebEnhancements !== formData.showMebEnhancements) { + setFormData({ + ...formData, + showMebEnhancements, + }); + } + }, [formData, setFormData, showMebEnhancements]); - useEffect( - () => { - if (showMebEnhancements06 !== formData.showMebEnhancements06) { - setFormData({ - ...formData, - showMebEnhancements06, - }); - } - }, - [formData, setFormData, showMebEnhancements06], - ); + useEffect(() => { + if (showMebEnhancements06 !== formData.showMebEnhancements06) { + setFormData({ + ...formData, + showMebEnhancements06, + }); + } + }, [formData, setFormData, showMebEnhancements06]); - useEffect( - () => { - if (showMebEnhancements08 !== formData.showMebEnhancements08) { - setFormData({ - ...formData, - showMebEnhancements08, - }); - } - }, - [formData, setFormData, showMebEnhancements08], - ); + useEffect(() => { + if (showMebEnhancements08 !== formData.showMebEnhancements08) { + setFormData({ + ...formData, + showMebEnhancements08, + }); + } + }, [formData, setFormData, showMebEnhancements08]); - useEffect( - () => { - if (!user?.login?.currentlyLoggedIn) { - return; - } - if (!fetchedDirectDeposit) { - setFetchedDirectDeposit(true); - getDirectDeposit(); - } - }, - [fetchedDirectDeposit, getDirectDeposit, user?.login?.currentlyLoggedIn], - ); + useEffect(() => { + if (!user?.login?.currentlyLoggedIn) { + return; + } + if (!fetchedDirectDeposit) { + setFetchedDirectDeposit(true); + getDirectDeposit(); + } + }, [fetchedDirectDeposit, getDirectDeposit, user?.login?.currentlyLoggedIn]); return ( <> - + Home Education and training @@ -176,7 +158,4 @@ const mapDispatchToProps = { setFormData: setData, }; -export default connect( - mapStateToProps, - mapDispatchToProps, -)(ToeApp); +export default connect(mapStateToProps, mapDispatchToProps)(ToeApp); diff --git a/src/applications/verify-your-enrollment/components/EnrollmentVerificationBreadcrumbs.jsx b/src/applications/verify-your-enrollment/components/EnrollmentVerificationBreadcrumbs.jsx index 8d48ca34ee7c..3255fe0d4c6b 100644 --- a/src/applications/verify-your-enrollment/components/EnrollmentVerificationBreadcrumbs.jsx +++ b/src/applications/verify-your-enrollment/components/EnrollmentVerificationBreadcrumbs.jsx @@ -31,5 +31,5 @@ export default function EnrollmentVerificationBreadcrumbs() { , ); } - return {breadcrumbs}; + return {breadcrumbs}; } diff --git a/src/applications/virtual-agent/components/page/Disclaimer.jsx b/src/applications/virtual-agent/components/page/Disclaimer.jsx index 77a22178c7b4..05558d2f94c3 100644 --- a/src/applications/virtual-agent/components/page/Disclaimer.jsx +++ b/src/applications/virtual-agent/components/page/Disclaimer.jsx @@ -4,7 +4,7 @@ import { CONTACTS } from '@department-of-veterans-affairs/component-library/cont export default function Disclaimer() { return ( <> - + Home Contact us VA chatbot