From f76118ced9fb7d2f0431d00719bdeecb0a4313a5 Mon Sep 17 00:00:00 2001
From: Kevin Beddingfield
Date: Wed, 4 Dec 2024 12:30:28 -0500
Subject: [PATCH 01/11] upgrade route setup
---
package.json | 6 +++-
.../app-entry.jsx | 6 ++--
.../package.json | 8 +++++
.../routes.jsx | 34 ++++++++++++-------
4 files changed, 38 insertions(+), 16 deletions(-)
create mode 100644 src/applications/accredited-representative-portal/package.json
diff --git a/package.json b/package.json
index c80839407e78..1451927ceb42 100644
--- a/package.json
+++ b/package.json
@@ -397,9 +397,13 @@
"src/platform/mhv",
"src/applications/check-in",
"src/applications/vaos",
- "src/applications/claims-status"
+ "src/applications/claims-status",
+ "src/applications/accredited-representative-portal/accreditation/21a",
+ "src/applications/accredited-representative-portal"
+
],
"nohoist": [
+ "**/applications-accredited-representative-portal/react-router-dom",
"**/applications-check-in/i18next-resources-to-backend",
"**/applications-check-in/react-i18next",
"**/applications-claims-status/@department-of-veterans-affairs/component-library",
diff --git a/src/applications/accredited-representative-portal/app-entry.jsx b/src/applications/accredited-representative-portal/app-entry.jsx
index f8f89b644be2..e62adbd14707 100644
--- a/src/applications/accredited-representative-portal/app-entry.jsx
+++ b/src/applications/accredited-representative-portal/app-entry.jsx
@@ -2,7 +2,7 @@ import '@department-of-veterans-affairs/platform-polyfills';
import React from 'react';
import { Provider } from 'react-redux';
-import { BrowserRouter } from 'react-router-dom-v5-compat';
+import { RouterProvider } from 'react-router-dom';
import startReactApp from '@department-of-veterans-affairs/platform-startup/react';
import { connectFeatureToggle } from 'platform/utilities/feature-toggles';
@@ -11,7 +11,7 @@ import './sass/accredited-representative-portal.scss';
import './sass/POARequestsTable.scss';
import manifest from './manifest.json';
-import routes from './routes';
+import router from './routes';
import createReduxStore from './store';
import rootReducer from './reducers';
@@ -21,6 +21,6 @@ connectFeatureToggle(store.dispatch);
startReactApp(
- {routes}
+ ,
);
diff --git a/src/applications/accredited-representative-portal/package.json b/src/applications/accredited-representative-portal/package.json
new file mode 100644
index 000000000000..4c1e7a758be8
--- /dev/null
+++ b/src/applications/accredited-representative-portal/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@department-of-veterans-affairs/applications-accredited-representative-portal",
+ "version": "1.0.0",
+ "private": true,
+ "dependencies": {
+ "react-router-dom": "^6.28.0"
+ }
+}
diff --git a/src/applications/accredited-representative-portal/routes.jsx b/src/applications/accredited-representative-portal/routes.jsx
index 56b4f1bdfc1d..ee58512b1ec0 100644
--- a/src/applications/accredited-representative-portal/routes.jsx
+++ b/src/applications/accredited-representative-portal/routes.jsx
@@ -1,20 +1,30 @@
import React from 'react';
-import { Route, Routes } from 'react-router-dom-v5-compat';
+import { createBrowserRouter } from 'react-router-dom';
import App from './containers/App';
import LandingPage from './containers/LandingPage';
import POARequestsPage from './containers/POARequestsPage';
import SignedInLayoutWrapper from './containers/SignedInLayoutWrapper';
-const routes = (
-
- }>
- } />
- }>
- } />
-
-
-
-);
+const router = createBrowserRouter([
+ {
+ element: ,
+ children: [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ element: ,
+ children: [
+ {
+ path: 'poa-requests',
+ element: ,
+ },
+ ],
+ },
+ ],
+ },
+]);
-export default routes;
+export default router;
From 6ff5117cf59191054e094da3c3736effd7f4e53f Mon Sep 17 00:00:00 2001
From: Kevin Beddingfield
Date: Wed, 4 Dec 2024 13:12:28 -0500
Subject: [PATCH 02/11] fixing merge issue
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 3f6d3af44487..62bde2460277 100644
--- a/package.json
+++ b/package.json
@@ -404,6 +404,7 @@
],
"nohoist": [
+ "**/applications/accredited-representative-portal/accreditation/21a/react-router",
"**/applications-accredited-representative-portal/react-router-dom",
"**/applications-check-in/i18next-resources-to-backend",
"**/applications-check-in/react-i18next",
From 203a89da1867ac347865f5573a891e16563728e9 Mon Sep 17 00:00:00 2001
From: Kevin Beddingfield
Date: Thu, 5 Dec 2024 12:53:25 -0500
Subject: [PATCH 03/11] setting path
---
src/applications/accredited-representative-portal/routes.jsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/applications/accredited-representative-portal/routes.jsx b/src/applications/accredited-representative-portal/routes.jsx
index ee58512b1ec0..6c5f9a2711b0 100644
--- a/src/applications/accredited-representative-portal/routes.jsx
+++ b/src/applications/accredited-representative-portal/routes.jsx
@@ -8,6 +8,7 @@ import SignedInLayoutWrapper from './containers/SignedInLayoutWrapper';
const router = createBrowserRouter([
{
+ path: '/representative',
element: ,
children: [
{
From 20b073532f9c9261595382173906c9013ea9118e Mon Sep 17 00:00:00 2001
From: Kevin Beddingfield
Date: Thu, 5 Dec 2024 14:29:10 -0500
Subject: [PATCH 04/11] getting rid of v5 compatible stuff
---
.../components/LandingPageWelcome/LandingPageWelcome.jsx | 2 +-
.../components/POARequestsCard/POARequestsCard.jsx | 2 +-
.../components/common/Breadcrumbs.jsx | 2 +-
.../accredited-representative-portal/containers/App.jsx | 2 +-
.../containers/SignedInLayout.jsx | 2 +-
.../tests/unit/helpers/index.jsx | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx b/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
index e8f8620dcdcd..8b03cbb809d5 100644
--- a/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
+++ b/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Link } from 'react-router-dom-v5-compat';
+import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
const LandingPageWelcome = ({ firstName = '', children }) => (
diff --git a/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx b/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
index 60bb956c4a7d..43df18de8eda 100644
--- a/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
+++ b/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Link } from 'react-router-dom-v5-compat';
+import { Link } from 'react-router-dom';
import {
formatDateParsedZoneLong,
timeFromNow,
diff --git a/src/applications/accredited-representative-portal/components/common/Breadcrumbs.jsx b/src/applications/accredited-representative-portal/components/common/Breadcrumbs.jsx
index 3d91c213f51f..194f16a698f9 100644
--- a/src/applications/accredited-representative-portal/components/common/Breadcrumbs.jsx
+++ b/src/applications/accredited-representative-portal/components/common/Breadcrumbs.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { useLocation } from 'react-router-dom-v5-compat';
+import { useLocation } from 'react-router-dom';
import upperFirst from 'lodash/upperFirst';
import lowerCase from 'lodash/lowerCase';
diff --git a/src/applications/accredited-representative-portal/containers/App.jsx b/src/applications/accredited-representative-portal/containers/App.jsx
index c4b8cbc249df..d7ef04d313f7 100644
--- a/src/applications/accredited-representative-portal/containers/App.jsx
+++ b/src/applications/accredited-representative-portal/containers/App.jsx
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
-import { Outlet } from 'react-router-dom-v5-compat';
+import { Outlet } from 'react-router';
import { VaLoadingIndicator } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
diff --git a/src/applications/accredited-representative-portal/containers/SignedInLayout.jsx b/src/applications/accredited-representative-portal/containers/SignedInLayout.jsx
index 7022b74b9796..0276d4aa7033 100644
--- a/src/applications/accredited-representative-portal/containers/SignedInLayout.jsx
+++ b/src/applications/accredited-representative-portal/containers/SignedInLayout.jsx
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Outlet } from 'react-router-dom-v5-compat';
+import { Outlet } from 'react-router-dom';
import { VaLoadingIndicator } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
diff --git a/src/applications/accredited-representative-portal/tests/unit/helpers/index.jsx b/src/applications/accredited-representative-portal/tests/unit/helpers/index.jsx
index ee5863be336f..1c5af1f09e7d 100644
--- a/src/applications/accredited-representative-portal/tests/unit/helpers/index.jsx
+++ b/src/applications/accredited-representative-portal/tests/unit/helpers/index.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import { Provider } from 'react-redux';
-import { MemoryRouter } from 'react-router-dom-v5-compat';
+import { MemoryRouter } from 'react-router-dom';
import { render } from '@testing-library/react';
import createReduxStore from '../../../store';
From 6ac162e385d84d665c5e894fafb4ff204d24675d Mon Sep 17 00:00:00 2001
From: Kevin Beddingfield
Date: Fri, 6 Dec 2024 10:49:15 -0500
Subject: [PATCH 05/11] link behavior
---
.../components/LandingPageWelcome/LandingPageWelcome.jsx | 2 +-
.../components/POARequestsCard/POARequestsCard.jsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx b/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
index 8b03cbb809d5..d3d8a38a4de5 100644
--- a/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
+++ b/src/applications/accredited-representative-portal/components/LandingPageWelcome/LandingPageWelcome.jsx
@@ -28,7 +28,7 @@ const LandingPageWelcome = ({ firstName = '', children }) => (
Until sign in is added use this to simulate sign in
diff --git a/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx b/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
index 43df18de8eda..9ccc84807106 100644
--- a/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
+++ b/src/applications/accredited-representative-portal/components/POARequestsCard/POARequestsCard.jsx
@@ -50,7 +50,7 @@ const POARequestsCard = ({ poaRequests }) => {
>
{poaRequest.status}
-
+
View details for