diff --git a/src/applications/mhv/secure-messaging/components/ThreadList/ThreadsList.jsx b/src/applications/mhv/secure-messaging/components/ThreadList/ThreadsList.jsx
index ee44dfee7d05..b18eb1d5362b 100644
--- a/src/applications/mhv/secure-messaging/components/ThreadList/ThreadsList.jsx
+++ b/src/applications/mhv/secure-messaging/components/ThreadList/ThreadsList.jsx
@@ -28,25 +28,33 @@ const ThreadsList = props => {
const [atEndOfThreads, setAtEndOfThreads] = useState(false);
- const fromToNums = useMemo(() => {
- const from = (pageNum - 1) * threadsPerPage + 1;
- const to = Math.min(pageNum * threadsPerPage, totalThreads);
- return { from, to };
- }, [pageNum, threadsPerPage, totalThreads]);
+ const fromToNums = useMemo(
+ () => {
+ const from = (pageNum - 1) * threadsPerPage + 1;
+ const to = Math.min(pageNum * threadsPerPage, totalThreads);
+ return { from, to };
+ },
+ [pageNum, threadsPerPage, totalThreads],
+ );
- useEffect(() => {
- // get display numbers
- if (fromToNums && totalThreads) {
- const label = `Showing ${fromToNums.from} to ${fromToNums.to} of ${totalThreads} conversations`;
- setDisplayNums({ ...fromToNums, label });
- }
+ useEffect(
+ () => {
+ // get display numbers
+ if (fromToNums && totalThreads) {
+ const label = `Showing ${fromToNums.from} to ${
+ fromToNums.to
+ } of ${totalThreads} conversations`;
+ setDisplayNums({ ...fromToNums, label });
+ }
- if (totalThreads === fromToNums.to) {
- setAtEndOfThreads(true);
- } else {
- setAtEndOfThreads(false);
- }
- }, [fromToNums, totalThreads]);
+ if (totalThreads === fromToNums.to) {
+ setAtEndOfThreads(true);
+ } else {
+ setAtEndOfThreads(false);
+ }
+ },
+ [fromToNums, totalThreads],
+ );
return (
<>
diff --git a/src/applications/mhv/secure-messaging/components/shared/AlertBackgroundBox.jsx b/src/applications/mhv/secure-messaging/components/shared/AlertBackgroundBox.jsx
index 93fe94a0af5a..03aa0af7203d 100644
--- a/src/applications/mhv/secure-messaging/components/shared/AlertBackgroundBox.jsx
+++ b/src/applications/mhv/secure-messaging/components/shared/AlertBackgroundBox.jsx
@@ -47,18 +47,21 @@ const AlertBackgroundBox = props => {
const location = useLocation();
const SrOnlyTag = alertContent === SERVER_ERROR_503 ? 'h1' : 'span';
- useEffect(() => {
- if (alertList?.length) {
- const filteredSortedAlerts = alertList
- .filter(alert => alert?.isActive)
- .sort((a, b) => {
- // Sort chronologically descending.
- return b.datestamp - a.datestamp;
- });
- // The activeAlert is the most recent alert marked as active.
- setActiveAlert(filteredSortedAlerts[0] || null);
- }
- }, [alertList]);
+ useEffect(
+ () => {
+ if (alertList?.length) {
+ const filteredSortedAlerts = alertList
+ .filter(alert => alert?.isActive)
+ .sort((a, b) => {
+ // Sort chronologically descending.
+ return b.datestamp - a.datestamp;
+ });
+ // The activeAlert is the most recent alert marked as active.
+ setActiveAlert(filteredSortedAlerts[0] || null);
+ }
+ },
+ [alertList],
+ );
const handleShowIcon = () => {
if (props.noIcon) {
@@ -78,29 +81,32 @@ const AlertBackgroundBox = props => {
const threadViewPage = /thread\/\d+/.test(location.pathname);
// sets custom server error messages for the landing page and folder view pages
- useEffect(() => {
- const isServiceOutage = activeAlert?.response?.code === SERVICE_OUTAGE;
- const isErrorAlert = activeAlert?.alertType === 'error';
- let content = activeAlert?.content;
-
- if (
- lastPathName !== 'Messages' &&
- !foldersViewPage &&
- !threadViewPage &&
- (isServiceOutage || isErrorAlert)
- ) {
- content = SERVER_ERROR_503;
- }
- setAlertContent(content);
- }, [
- SERVER_ERROR_503,
- SERVICE_OUTAGE,
- activeAlert,
- foldersViewPage,
- lastPathName,
- location.pathname,
- threadViewPage,
- ]);
+ useEffect(
+ () => {
+ const isServiceOutage = activeAlert?.response?.code === SERVICE_OUTAGE;
+ const isErrorAlert = activeAlert?.alertType === 'error';
+ let content = activeAlert?.content;
+
+ if (
+ lastPathName !== 'Messages' &&
+ !foldersViewPage &&
+ !threadViewPage &&
+ (isServiceOutage || isErrorAlert)
+ ) {
+ content = SERVER_ERROR_503;
+ }
+ setAlertContent(content);
+ },
+ [
+ SERVER_ERROR_503,
+ SERVICE_OUTAGE,
+ activeAlert,
+ foldersViewPage,
+ lastPathName,
+ location.pathname,
+ threadViewPage,
+ ],
+ );
useInterval(() => {
const shouldRetrieveFolders =
diff --git a/src/applications/mhv/secure-messaging/components/shared/AlertBox.jsx b/src/applications/mhv/secure-messaging/components/shared/AlertBox.jsx
index f9e9d5d72740..aafa643daafb 100644
--- a/src/applications/mhv/secure-messaging/components/shared/AlertBox.jsx
+++ b/src/applications/mhv/secure-messaging/components/shared/AlertBox.jsx
@@ -16,20 +16,23 @@ const AlertBox = () => {
const alertList = useSelector(state => state.sm.alerts?.alertList);
const [activeAlert, setActiveAlert] = useState(true);
- useEffect(() => {
- if (alertList?.length) {
- const filteredSortedAlerts = alertList
- .filter(alert => alert.isActive)
- .sort((a, b) => {
- // Sort chronologically descending.
- return b.datestamp - a.datestamp;
- });
- if (filteredSortedAlerts.length > 0) {
- // The activeAlert is the most recent alert marked as active.
- setActiveAlert(filteredSortedAlerts[0]);
+ useEffect(
+ () => {
+ if (alertList?.length) {
+ const filteredSortedAlerts = alertList
+ .filter(alert => alert.isActive)
+ .sort((a, b) => {
+ // Sort chronologically descending.
+ return b.datestamp - a.datestamp;
+ });
+ if (filteredSortedAlerts.length > 0) {
+ // The activeAlert is the most recent alert marked as active.
+ setActiveAlert(filteredSortedAlerts[0]);
+ }
}
- }
- }, [alertList]);
+ },
+ [alertList],
+ );
return (
alertVisible &&
diff --git a/src/applications/mhv/secure-messaging/components/shared/BlockedTriageGroupAlert.jsx b/src/applications/mhv/secure-messaging/components/shared/BlockedTriageGroupAlert.jsx
index 2cde1f63c88d..8db29e5f889c 100644
--- a/src/applications/mhv/secure-messaging/components/shared/BlockedTriageGroupAlert.jsx
+++ b/src/applications/mhv/secure-messaging/components/shared/BlockedTriageGroupAlert.jsx
@@ -64,21 +64,24 @@ const BlockedTriageGroupAlert = props => {
: sortTriageList(blockedTriageGroupList);
}, []);
- useEffect(() => {
- if (alertTitleText !== alertTitle.NO_ASSOCIATIONS) {
- let value = '';
- if (alertTitleText.includes(MESSAGE_TO_CARE_TEAMS)) {
- value = `${MESSAGE_TO_CARE_TEAMS} FACILITY`;
- } else if (alertTitleText.includes(MESSAGE_TO_CARE_TEAM)) {
- value = `${MESSAGE_TO_CARE_TEAM} TG_NAME`;
- } else if (alertTitleText.includes(ACCOUNT_DISCONNECTED)) {
- value = `${ACCOUNT_DISCONNECTED} TG_NAME`;
- } else {
- value = alertTitleText;
+ useEffect(
+ () => {
+ if (alertTitleText !== alertTitle.NO_ASSOCIATIONS) {
+ let value = '';
+ if (alertTitleText.includes(MESSAGE_TO_CARE_TEAMS)) {
+ value = `${MESSAGE_TO_CARE_TEAMS} FACILITY`;
+ } else if (alertTitleText.includes(MESSAGE_TO_CARE_TEAM)) {
+ value = `${MESSAGE_TO_CARE_TEAM} TG_NAME`;
+ } else if (alertTitleText.includes(ACCOUNT_DISCONNECTED)) {
+ value = `${ACCOUNT_DISCONNECTED} TG_NAME`;
+ } else {
+ value = alertTitleText;
+ }
+ datadogRum.addAction('Blocked triage group alert', { type: value });
}
- datadogRum.addAction('Blocked triage group alert', { type: value });
- }
- }, [alertTitle.NO_ASSOCIATIONS, alertTitleText]);
+ },
+ [alertTitle.NO_ASSOCIATIONS, alertTitleText],
+ );
useEffect(() => {
if (parentComponent === ParentComponent.FOLDER_HEADER) {
diff --git a/src/applications/mhv/secure-messaging/components/shared/ScrollToTop.jsx b/src/applications/mhv/secure-messaging/components/shared/ScrollToTop.jsx
index 57af22ded86a..c21bdbdff841 100644
--- a/src/applications/mhv/secure-messaging/components/shared/ScrollToTop.jsx
+++ b/src/applications/mhv/secure-messaging/components/shared/ScrollToTop.jsx
@@ -4,11 +4,14 @@ import PropTypes from 'prop-types';
const ScrollToTop = props => {
const location = useLocation();
- useEffect(() => {
- if (!location.hash) {
- window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
- }
- }, [location]);
+ useEffect(
+ () => {
+ if (!location.hash) {
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
+ }
+ },
+ [location],
+ );
return <>{props.children}>;
};
diff --git a/src/applications/mhv/secure-messaging/containers/FolderThreadListView.jsx b/src/applications/mhv/secure-messaging/containers/FolderThreadListView.jsx
index a76c452750ec..6cfdaa75d6b8 100644
--- a/src/applications/mhv/secure-messaging/containers/FolderThreadListView.jsx
+++ b/src/applications/mhv/secure-messaging/containers/FolderThreadListView.jsx
@@ -67,93 +67,108 @@ const FolderThreadListView = props => {
waitForRenderThenFocus(displayingNumberOfThreadsSelector, document, 500);
};
- useEffect(() => {
- // clear out folder reducer to prevent from previous folder data flashing
- // when navigating between folders
- if (!testing) dispatch(clearFolder());
+ useEffect(
+ () => {
+ // clear out folder reducer to prevent from previous folder data flashing
+ // when navigating between folders
+ if (!testing) dispatch(clearFolder());
- let id = null;
- if (params?.folderId) {
- id = params.folderId;
- } else {
- switch (location.pathname) {
- case Paths.INBOX:
- id = Folders.INBOX.id;
- break;
- case Paths.SENT:
- id = Folders.SENT.id;
- break;
- case Paths.DRAFTS:
- id = Folders.DRAFTS.id;
- break;
- case Paths.DELETED:
- id = Folders.DELETED.id;
- break;
- default:
- break;
+ let id = null;
+ if (params?.folderId) {
+ id = params.folderId;
+ } else {
+ switch (location.pathname) {
+ case Paths.INBOX:
+ id = Folders.INBOX.id;
+ break;
+ case Paths.SENT:
+ id = Folders.SENT.id;
+ break;
+ case Paths.DRAFTS:
+ id = Folders.DRAFTS.id;
+ break;
+ case Paths.DELETED:
+ id = Folders.DELETED.id;
+ break;
+ default:
+ break;
+ }
}
- }
- dispatch(retrieveFolder(id));
+ dispatch(retrieveFolder(id));
- return () => {
- // clear out alerts if user navigates away from this component
- if (location.pathname) {
- dispatch(closeAlert());
- }
- };
- }, [dispatch, location.pathname, params.folderId]);
+ return () => {
+ // clear out alerts if user navigates away from this component
+ if (location.pathname) {
+ dispatch(closeAlert());
+ }
+ };
+ },
+ [dispatch, location.pathname, params.folderId],
+ );
- useEffect(() => {
- if (folder?.folderId !== (null || undefined)) {
- if (folder.name === convertPathNameToTitleCase(location.pathname)) {
- updatePageTitle(`${folder.name} ${PageTitles.PAGE_TITLE_TAG}`);
+ useEffect(
+ () => {
+ if (folder?.folderId !== (null || undefined)) {
+ if (folder.name === convertPathNameToTitleCase(location.pathname)) {
+ updatePageTitle(`${folder.name} ${PageTitles.PAGE_TITLE_TAG}`);
+ }
+ if (folder.folderId !== threadSort?.folderId) {
+ dispatch(
+ setThreadSortOrder(
+ threadSortingOptions.SENT_DATE_DESCENDING.value,
+ folder.folderId,
+ 1,
+ ),
+ );
+ // updates page title
+ } else {
+ dispatch(
+ setThreadSortOrder(
+ threadSort.value,
+ folder.folderId,
+ threadSort.page,
+ ),
+ );
+ }
+
+ if (folder.folderId !== searchFolder?.folderId) {
+ dispatch(clearSearchResults());
+ }
}
- if (folder.folderId !== threadSort?.folderId) {
- dispatch(
- setThreadSortOrder(
- threadSortingOptions.SENT_DATE_DESCENDING.value,
- folder.folderId,
- 1,
- ),
- );
- // updates page title
- } else {
+ },
+ [folder?.folderId, dispatch],
+ );
+
+ useEffect(
+ () => {
+ if (
+ folder?.folderId !== (null || undefined) &&
+ threadSort.value !== null
+ ) {
dispatch(
- setThreadSortOrder(
- threadSort.value,
+ getListOfThreads(
folder.folderId,
+ threadsPerPage,
threadSort.page,
+ threadSort.value,
),
);
}
+ },
+ [dispatch, threadSort.value, threadSort.folderId, threadSort.page],
+ );
- if (folder.folderId !== searchFolder?.folderId) {
- dispatch(clearSearchResults());
- }
- }
- }, [folder?.folderId, dispatch]);
-
- useEffect(() => {
- if (folder?.folderId !== (null || undefined) && threadSort.value !== null) {
- dispatch(
- getListOfThreads(
- folder.folderId,
- threadsPerPage,
- threadSort.page,
- threadSort.value,
- ),
- );
- }
- }, [dispatch, threadSort.value, threadSort.folderId, threadSort.page]);
-
- useEffect(() => {
- const alertVisible = alertList[alertList?.length - 1];
- const alertSelector =
- folder !== undefined && !alertVisible?.isActive
- ? 'h1'
- : alertVisible?.isActive && 'va-alert';
- focusElement(document.querySelector(alertSelector));
- }, [alertList, folder]);
+ useEffect(
+ () => {
+ const alertVisible = alertList[alertList?.length - 1];
+ const alertSelector =
+ folder !== undefined && !alertVisible?.isActive
+ ? 'h1'
+ : alertVisible?.isActive && 'va-alert';
+ focusElement(document.querySelector(alertSelector));
+ },
+ [alertList, folder],
+ );
useInterval(() => {
if (folder?.folderId !== null) {
@@ -179,77 +194,85 @@ const FolderThreadListView = props => {
);
};
- const content = useMemo(() => {
- if (isLoading || awaitingResults) {
- return
;
- }
+ const content = useMemo(
+ () => {
+ if (isLoading || awaitingResults) {
+ return
;
+ }
- if (threadList?.length === 0) {
- return (
- <>
- {!noAssociations && !allTriageGroupsBlocked && (
-
- Showing 0 of 0 conversations
-
- )}
+ if (threadList?.length === 0) {
+ return (
+ <>
+ {!noAssociations &&
+ !allTriageGroupsBlocked && (
+
+ Showing 0 of 0 conversations
+
+ )}
-
-
- {Alerts.Message.NO_MESSAGES}
-
-
- >
- );
- }
+
+
+
+ {Alerts.Message.NO_MESSAGES}
+
+
+
+ >
+ );
+ }
- if (error) {
- return (
-
- We’re sorry. Something went wrong on our end
-
- You can’t view your secure messages because something went wrong on
- our end. Please check back soon.
-
-
- );
- }
+ if (error) {
+ return (
+
+
+ We’re sorry. Something went wrong on our end
+
+
+ You can’t view your secure messages because something went wrong
+ on our end. Please check back soon.
+
+
+ );
+ }
- if (searchResults !== undefined) {
- return
;
- }
+ if (searchResults !== undefined) {
+ return
;
+ }
- if (threadList?.length > 0) {
- return (
- <>
-
- >
- );
- }
- return null;
- }, [
- awaitingResults,
- folder,
- handlePagination,
- handleSortCallback,
- isLoading,
- searchResults,
- threadList,
- threadSort.page,
- threadSort.value,
- ]);
+ if (threadList?.length > 0) {
+ return (
+ <>
+
+ >
+ );
+ }
+ return null;
+ },
+ [
+ awaitingResults,
+ folder,
+ handlePagination,
+ handleSortCallback,
+ isLoading,
+ searchResults,
+ threadList,
+ threadSort.page,
+ threadSort.value,
+ ],
+ );
return (
diff --git a/src/applications/mhv/secure-messaging/containers/Folders.jsx b/src/applications/mhv/secure-messaging/containers/Folders.jsx
index 38e89cfe8653..2c7ce72eff08 100644
--- a/src/applications/mhv/secure-messaging/containers/Folders.jsx
+++ b/src/applications/mhv/secure-messaging/containers/Folders.jsx
@@ -19,29 +19,38 @@ const Folders = () => {
const [isModalVisible, setIsModalVisible] = useState(false);
// clear out alerts if user navigates away from this component
- useEffect(() => {
- return () => {
- if (location.pathname) {
- dispatch(closeAlert());
- }
- };
- }, [location.pathname, dispatch]);
+ useEffect(
+ () => {
+ return () => {
+ if (location.pathname) {
+ dispatch(closeAlert());
+ }
+ };
+ },
+ [location.pathname, dispatch],
+ );
- useEffect(() => {
- dispatch(getFolders());
- }, [dispatch, location, isModalVisible]);
+ useEffect(
+ () => {
+ dispatch(getFolders());
+ },
+ [dispatch, location, isModalVisible],
+ );
- useEffect(() => {
- if (!isModalVisible) {
- const alertVisible = alertList[alertList?.length - 1];
- const alertSelector =
- folders !== undefined && !alertVisible?.isActive
- ? 'h1'
- : alertVisible?.isActive && 'va-alert';
- focusElement(document.querySelector(alertSelector));
- updatePageTitle(PageTitles.MY_FOLDERS_PAGE_TITLE_TAG);
- }
- }, [alertList, folders, isModalVisible]);
+ useEffect(
+ () => {
+ if (!isModalVisible) {
+ const alertVisible = alertList[alertList?.length - 1];
+ const alertSelector =
+ folders !== undefined && !alertVisible?.isActive
+ ? 'h1'
+ : alertVisible?.isActive && 'va-alert';
+ focusElement(document.querySelector(alertSelector));
+ updatePageTitle(PageTitles.MY_FOLDERS_PAGE_TITLE_TAG);
+ }
+ },
+ [alertList, folders, isModalVisible],
+ );
const openNewModal = () => {
dispatch(closeAlert());
diff --git a/src/applications/mhv/secure-messaging/containers/InterstitialPage.jsx b/src/applications/mhv/secure-messaging/containers/InterstitialPage.jsx
index a5b81f78c147..c5280af07e9c 100644
--- a/src/applications/mhv/secure-messaging/containers/InterstitialPage.jsx
+++ b/src/applications/mhv/secure-messaging/containers/InterstitialPage.jsx
@@ -10,16 +10,19 @@ const InterstitialPage = props => {
focusElement(document.querySelector('h1'));
}, []);
- const continueButtonText = useMemo(() => {
- switch (type) {
- case 'reply':
- return 'Continue to reply';
- case 'draft':
- return 'Continue to draft';
- default:
- return 'Continue to start message';
- }
- }, [type]);
+ const continueButtonText = useMemo(
+ () => {
+ switch (type) {
+ case 'reply':
+ return 'Continue to reply';
+ case 'draft':
+ return 'Continue to draft';
+ default:
+ return 'Continue to start message';
+ }
+ },
+ [type],
+ );
return (
From e573e35d9a4a45be349e7bf9b1d3bb195f0a2ee8 Mon Sep 17 00:00:00 2001
From: Vic Saleem
Date: Mon, 18 Mar 2024 16:43:06 -0500
Subject: [PATCH 29/31] cleanup using eslint
---
.../profile/components/Profile.jsx | 5 +-
.../components/direct-deposit/BankInfo.jsx | 60 +++++++++++--------
.../ContactInfoOnFile.jsx | 4 +-
.../vaos/components/Breadcrumbs.jsx | 9 ++-
.../verify-your-enrollment/hooks/useData.js | 11 ++--
5 files changed, 56 insertions(+), 33 deletions(-)
diff --git a/src/applications/personalization/profile/components/Profile.jsx b/src/applications/personalization/profile/components/Profile.jsx
index d9032c817764..3ac963be21ba 100644
--- a/src/applications/personalization/profile/components/Profile.jsx
+++ b/src/applications/personalization/profile/components/Profile.jsx
@@ -371,4 +371,7 @@ const mapDispatchToProps = {
export { Profile as ProfileUnconnected, mapStateToProps };
-export default connect(mapStateToProps, mapDispatchToProps)(Profile);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps,
+)(Profile);
diff --git a/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx b/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
index 34d37140b96e..bef870c6e0b5 100644
--- a/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
+++ b/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
@@ -100,31 +100,40 @@ export const BankInfo = ({
const isEmptyForm =
!formAccountNumber && !formAccountType && !formRoutingNumber;
- useEffect(() => {
- setFormIsDirty(isEmptyForm);
- }, [isEmptyForm, setFormIsDirty]);
-
- useEffect(() => {
- return () => {
- if (isEditingBankInfo) {
- toggleEditState(false);
- }
- };
- }, [isEditingBankInfo, toggleEditState]);
+ useEffect(
+ () => {
+ setFormIsDirty(isEmptyForm);
+ },
+ [isEmptyForm, setFormIsDirty],
+ );
+
+ useEffect(
+ () => {
+ return () => {
+ if (isEditingBankInfo) {
+ toggleEditState(false);
+ }
+ };
+ },
+ [isEditingBankInfo, toggleEditState],
+ );
// when we enter and exit edit mode...
- useEffect(() => {
- if (isEditingBankInfo && !wasEditingBankInfo) {
- focusOnMainHeading(sectionTitleId);
- }
- if (wasEditingBankInfo && !isEditingBankInfo) {
- // clear the form data when exiting edit mode so it's blank when the
- // edit form is shown again
- setFormData({});
- // focus the edit button when we exit edit mode
- editBankInfoButton.current.focus();
- }
- }, [isEditingBankInfo, wasEditingBankInfo, sectionTitleId]);
+ useEffect(
+ () => {
+ if (isEditingBankInfo && !wasEditingBankInfo) {
+ focusOnMainHeading(sectionTitleId);
+ }
+ if (wasEditingBankInfo && !isEditingBankInfo) {
+ // clear the form data when exiting edit mode so it's blank when the
+ // edit form is shown again
+ setFormData({});
+ // focus the edit button when we exit edit mode
+ editBankInfoButton.current.focus();
+ }
+ },
+ [isEditingBankInfo, wasEditingBankInfo, sectionTitleId],
+ );
const saveBankInfo = () => {
const fields = {
@@ -481,4 +490,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
};
};
-export default connect(mapStateToProps, mapDispatchToProps)(BankInfo);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps,
+)(BankInfo);
diff --git a/src/applications/personalization/profile/components/notification-settings/ContactInfoOnFile.jsx b/src/applications/personalization/profile/components/notification-settings/ContactInfoOnFile.jsx
index e660b9f8005b..237cb11bfc1d 100644
--- a/src/applications/personalization/profile/components/notification-settings/ContactInfoOnFile.jsx
+++ b/src/applications/personalization/profile/components/notification-settings/ContactInfoOnFile.jsx
@@ -47,7 +47,9 @@ const ContactInfoOnFile = ({
{mobilePhoneNumber && (
)}
diff --git a/src/applications/vaos/components/Breadcrumbs.jsx b/src/applications/vaos/components/Breadcrumbs.jsx
index e37f0de250b3..7de9a1531043 100644
--- a/src/applications/vaos/components/Breadcrumbs.jsx
+++ b/src/applications/vaos/components/Breadcrumbs.jsx
@@ -29,9 +29,12 @@ export default function VAOSBreadcrumbs({ children }) {
const covidLabel = useSelector(state => getCovidUrlLabel(state, location));
const newLabel = label === undefined || label === null ? covidLabel : label;
- useEffect(() => {
- setBreadcrumb(newLabel);
- }, [location, newLabel]);
+ useEffect(
+ () => {
+ setBreadcrumb(newLabel);
+ },
+ [location, newLabel],
+ );
const getBreadcrumbList = () => {
const isPast = location.pathname.includes('/past');
diff --git a/src/applications/verify-your-enrollment/hooks/useData.js b/src/applications/verify-your-enrollment/hooks/useData.js
index 1c1d9c762b1b..6a63c2db954f 100644
--- a/src/applications/verify-your-enrollment/hooks/useData.js
+++ b/src/applications/verify-your-enrollment/hooks/useData.js
@@ -13,10 +13,13 @@ export const useData = () => {
const { data, loading } = useSelector(state => state.getDataReducer);
const { personalInfo, isLoading } = useSelector(state => state.personalInfo);
- useEffect(() => {
- dispatch(getData());
- dispatch(fetchPersonalInfo());
- }, [dispatch]);
+ useEffect(
+ () => {
+ dispatch(getData());
+ dispatch(fetchPersonalInfo());
+ },
+ [dispatch],
+ );
const isUserLoggedIn = localStorage.getItem('hasSession') !== null;
const userInfo = isUserLoggedIn
From fdbb3a6db966777a1bd6273a1faf3c27afa8f268 Mon Sep 17 00:00:00 2001
From: Vic Saleem
Date: Mon, 18 Mar 2024 16:50:46 -0500
Subject: [PATCH 30/31] cleanup files not apart of sm
---
.../dashboard/tests/components/debts/Debts.unit.spec.jsx | 2 +-
.../profile/components/direct-deposit/BankInfo.jsx | 7 ++++---
.../view-dependents/layouts/ViewDependentsLayout.jsx | 8 ++++----
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx b/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
index 4560f43e51a2..31669cb345a8 100644
--- a/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
+++ b/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
@@ -10,10 +10,10 @@ import {
setFetchJSONResponse,
} from '~/platform/testing/unit/helpers';
-import { renderInReduxProvider } from '~/platform/testing/unit/react-testing-library-helpers';
import { createDebtsSuccess } from '../../../mocks/debts';
import { user81Copays } from '../../../mocks/medical-copays';
import BenefitPaymentsAndDebt from '../../../components/debts/Debts';
+import { renderInReduxProvider } from '~/platform/testing/unit/react-testing-library-helpers';
import reducers from '../../../reducers';
const mockStore = configureStore([thunk]);
diff --git a/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx b/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
index bef870c6e0b5..515979a15797 100644
--- a/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
+++ b/src/applications/personalization/profile/components/direct-deposit/BankInfo.jsx
@@ -32,19 +32,20 @@ import LoadingButton from '~/platform/site-wide/loading-button/LoadingButton';
import { isLOA3 as isLOA3Selector } from '~/platform/user/selectors';
import { usePrevious } from '~/platform/utilities/react-hooks';
-import prefixUtilityClasses from '~/platform/utilities/prefix-utility-classes';
-import { benefitTypes } from '~/applications/personalization/common/constants';
-import ConfirmCancelModal from '~/platform/user/profile/vap-svc/components/ContactInformationFieldInfo/ConfirmCancelModal';
import DirectDepositConnectionError from './alerts/DirectDepositConnectionError';
import BankInfoForm, { makeFormProperties } from './BankInfoForm';
import PaymentInformationEditError from './PaymentInformationEditError';
+import prefixUtilityClasses from '~/platform/utilities/prefix-utility-classes';
+import { benefitTypes } from '~/applications/personalization/common/constants';
+
import NotEligible from './alerts/NotEligible';
import { BANK_INFO_UPDATED_ALERT_SETTINGS } from '../../constants';
import { ProfileInfoCard } from '../ProfileInfoCard';
import { EduMigrationDowntimeAlert } from './alerts/EduMigrationDowntimeAlert';
+import ConfirmCancelModal from '~/platform/user/profile/vap-svc/components/ContactInformationFieldInfo/ConfirmCancelModal';
export const BankInfo = ({
isLOA3,
diff --git a/src/applications/personalization/view-dependents/layouts/ViewDependentsLayout.jsx b/src/applications/personalization/view-dependents/layouts/ViewDependentsLayout.jsx
index 90354bc6cf1f..5703170bac68 100644
--- a/src/applications/personalization/view-dependents/layouts/ViewDependentsLayout.jsx
+++ b/src/applications/personalization/view-dependents/layouts/ViewDependentsLayout.jsx
@@ -73,14 +73,14 @@ function ViewDependentsLayout(props) {
}
ViewDependentsLayout.propTypes = {
- dependencyVerificationToggle: PropTypes.func,
- dependentsToggle: PropTypes.func,
error: PropTypes.object,
+ notOnAwardDependents: PropTypes.array,
+ onAwardDependents: PropTypes.array,
loading: PropTypes.bool,
+ dependentsToggle: PropTypes.func,
+ dependencyVerificationToggle: PropTypes.func,
manageDependentsToggle: PropTypes.func,
- notOnAwardDependents: PropTypes.array,
updateDiariesStatus: PropTypes.func,
- onAwardDependents: PropTypes.array,
};
export default ViewDependentsLayout;
From 7320089267d38a09262ead627c7e0f3ae6f9d559 Mon Sep 17 00:00:00 2001
From: Vic Saleem
Date: Mon, 18 Mar 2024 16:52:24 -0500
Subject: [PATCH 31/31] cleanup non-sm file
---
.../dashboard/tests/components/debts/Debts.unit.spec.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx b/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
index 31669cb345a8..1403f700bb97 100644
--- a/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
+++ b/src/applications/personalization/dashboard/tests/components/debts/Debts.unit.spec.jsx
@@ -13,8 +13,8 @@ import {
import { createDebtsSuccess } from '../../../mocks/debts';
import { user81Copays } from '../../../mocks/medical-copays';
import BenefitPaymentsAndDebt from '../../../components/debts/Debts';
-import { renderInReduxProvider } from '~/platform/testing/unit/react-testing-library-helpers';
import reducers from '../../../reducers';
+import { renderInReduxProvider } from '~/platform/testing/unit/react-testing-library-helpers';
const mockStore = configureStore([thunk]);