diff --git a/package.json b/package.json
index dcf5187205..c1be3151a8 100644
--- a/package.json
+++ b/package.json
@@ -54,6 +54,7 @@
"date-fns": "2.30.0",
"fast-deep-equal": "3.1.3",
"formik": "2.4.5",
+ "history": "5.3.0",
"http-proxy-middleware": "2.0.6",
"human-interval": "2.0.1",
"js-file-download": "0.4.12",
@@ -65,8 +66,7 @@
"react-dropzone": "14.2.3",
"react-portal": "4.2.2",
"react-redux": "8.0.5",
- "react-router-dom": "5.3.4",
- "react-router-dom-v5-compat": "6.22.3",
+ "react-router-dom": "6.22.3",
"react-storage-hooks": "4.0.1",
"react-useportal": "1.0.19",
"reconnecting-websocket": "4.4.0",
diff --git a/src/__snapshots__/root-reducer.test.ts.snap b/src/__snapshots__/root-reducer.test.ts.snap
index 578328912a..41be873428 100644
--- a/src/__snapshots__/root-reducer.test.ts.snap
+++ b/src/__snapshots__/root-reducer.test.ts.snap
@@ -278,6 +278,7 @@ exports[`rootReducer > should reset app to initial state on LOGOUT_SUCCESS, exce
"action": "POP",
"location": {
"hash": "",
+ "key": "",
"pathname": "/",
"search": "",
"state": null,
diff --git a/src/app/Routes.test.tsx b/src/app/Routes.test.tsx
index 2e6e8e6a97..4afa0dbe1b 100644
--- a/src/app/Routes.test.tsx
+++ b/src/app/Routes.test.tsx
@@ -197,13 +197,13 @@ describe("Routes", () => {
expect(window.location.pathname).toBe(urls.machines.index);
});
- it("redirects from Settings base URL to configuration", async () => {
+ it("redirects from Settings base URL to general", async () => {
renderWithBrowserRouter(, {
route: urls.settings.index,
state,
});
await waitFor(() =>
- expect(window.location.pathname).toBe(urls.settings.configuration.index)
+ expect(window.location.pathname).toBe(urls.settings.configuration.general)
);
});
diff --git a/src/app/Routes.tsx b/src/app/Routes.tsx
index 00d3d24ce3..07a631cc4a 100644
--- a/src/app/Routes.tsx
+++ b/src/app/Routes.tsx
@@ -1,7 +1,6 @@
import { lazy } from "react";
-import { Redirect } from "react-router-dom";
-import { Route, Routes as ReactRouterRoutes } from "react-router-dom-v5-compat";
+import { Navigate, Route, Routes as ReactRouterRoutes } from "react-router-dom";
import ErrorBoundary from "@/app/base/components/ErrorBoundary";
import urls from "@/app/base/urls";
@@ -41,7 +40,10 @@ const ZonesList = lazy(() => import("@/app/zones/views/ZonesList"));
const Routes = (): JSX.Element => (
- } path={urls.index} />
+ }
+ path={urls.index}
+ />
@@ -75,11 +77,11 @@ const Routes = (): JSX.Element => (
path={`${urls.networkDiscovery.index}/*`}
/>
}
+ element={}
path={urls.networkDiscovery.legacyIndex}
/>
}
+ element={}
path={urls.networkDiscovery.legacyConfiguration}
/>
{
- const actual: object = await vi.importActual("react-router-dom-v5-compat");
+vi.mock("react-router-dom", async () => {
+ const actual: object = await vi.importActual("react-router-dom");
return {
...actual,
useNavigate: () => mockUseNavigate,
@@ -102,9 +102,7 @@ describe("GlobalSideNav", () => {
render(
-
-
-
+
);
@@ -339,11 +337,9 @@ describe("GlobalSideNav", () => {
render(
-
-
- } path="*" />
-
-
+
+ } path="*" />
+
);
diff --git a/src/app/base/components/AppSideNavigation/AppSideNavigation.tsx b/src/app/base/components/AppSideNavigation/AppSideNavigation.tsx
index 33ebdd5027..d1840c5a5d 100644
--- a/src/app/base/components/AppSideNavigation/AppSideNavigation.tsx
+++ b/src/app/base/components/AppSideNavigation/AppSideNavigation.tsx
@@ -2,7 +2,7 @@ import { useEffect, useMemo } from "react";
import { Navigation, NavigationBar } from "@canonical/maas-react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate, useLocation, useMatch } from "react-router-dom-v5-compat";
+import { useNavigate, useLocation, useMatch } from "react-router-dom";
import { useStorageState } from "react-storage-hooks";
import AppSideNavItems from "./AppSideNavItems";
diff --git a/src/app/base/components/AppSideNavigation/NavigationBanner/NavigationBanner.tsx b/src/app/base/components/AppSideNavigation/NavigationBanner/NavigationBanner.tsx
index ff82b7a057..c4c14773e7 100644
--- a/src/app/base/components/AppSideNavigation/NavigationBanner/NavigationBanner.tsx
+++ b/src/app/base/components/AppSideNavigation/NavigationBanner/NavigationBanner.tsx
@@ -1,5 +1,5 @@
import { Navigation } from "@canonical/maas-react-components";
-import { Link, useLocation } from "react-router-dom-v5-compat";
+import { Link, useLocation } from "react-router-dom";
import { isSelected } from "../utils";
diff --git a/src/app/base/components/AppSideNavigation/utils.ts b/src/app/base/components/AppSideNavigation/utils.ts
index c4f2ff550c..8b3859b695 100644
--- a/src/app/base/components/AppSideNavigation/utils.ts
+++ b/src/app/base/components/AppSideNavigation/utils.ts
@@ -1,4 +1,4 @@
-import { matchPath } from "react-router-dom-v5-compat";
+import { matchPath } from "react-router-dom";
import type { NavItem } from "./types";
diff --git a/src/app/base/components/AppSidePanel/AppSidePanel.tsx b/src/app/base/components/AppSidePanel/AppSidePanel.tsx
index a655bc0585..8c881c82c3 100644
--- a/src/app/base/components/AppSidePanel/AppSidePanel.tsx
+++ b/src/app/base/components/AppSidePanel/AppSidePanel.tsx
@@ -3,10 +3,10 @@ import { useEffect, type ReactNode } from "react";
import { ContentSection } from "@canonical/maas-react-components";
import { useOnEscapePressed } from "@canonical/react-components";
import classNames from "classnames";
-import { useHistory } from "react-router-dom";
import type { SidePanelSize } from "@/app/base/side-panel-context";
import { useSidePanel } from "@/app/base/side-panel-context";
+import { history } from "@/redux-store";
export type AppSidePanelProps = {
title: string | null;
@@ -16,7 +16,6 @@ export type AppSidePanelProps = {
const useCloseSidePanelOnRouteChange = (): void => {
const { setSidePanelContent } = useSidePanel();
- const history = useHistory();
// close side panel on route change
useEffect(() => {
@@ -25,7 +24,7 @@ const useCloseSidePanelOnRouteChange = (): void => {
return () => {
unlisten();
};
- }, [history, setSidePanelContent]);
+ }, [setSidePanelContent]);
};
const useResetSidePanelOnUnmount = (): void => {
diff --git a/src/app/base/components/ControllerLink/ControllerLink.test.tsx b/src/app/base/components/ControllerLink/ControllerLink.test.tsx
index d150770d33..34e23ff2b3 100644
--- a/src/app/base/components/ControllerLink/ControllerLink.test.tsx
+++ b/src/app/base/components/ControllerLink/ControllerLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerLink, { Labels } from "./ControllerLink";
@@ -19,9 +18,7 @@ it("handles when controllers are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a controller does not exist", () => {
const { container } = render(
-
-
-
+
);
@@ -62,9 +57,7 @@ it("renders a link if controllers have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/ControllerLink/ControllerLink.tsx b/src/app/base/components/ControllerLink/ControllerLink.tsx
index 3c6cf0abd4..b97b97a952 100644
--- a/src/app/base/components/ControllerLink/ControllerLink.tsx
+++ b/src/app/base/components/ControllerLink/ControllerLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/DHCPTable/DHCPTable.test.tsx b/src/app/base/components/DHCPTable/DHCPTable.test.tsx
index 2f879ae1be..81edb62b69 100644
--- a/src/app/base/components/DHCPTable/DHCPTable.test.tsx
+++ b/src/app/base/components/DHCPTable/DHCPTable.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DHCPTable, { TestIds } from "./DHCPTable";
@@ -51,12 +50,10 @@ describe("DHCPTable", () => {
-
-
-
+
);
@@ -79,12 +76,10 @@ describe("DHCPTable", () => {
-
-
-
+
);
@@ -108,9 +103,7 @@ describe("DHCPTable", () => {
-
-
-
+
);
@@ -139,12 +132,10 @@ describe("DHCPTable", () => {
-
-
-
+
);
diff --git a/src/app/base/components/DHCPTable/DHCPTable.tsx b/src/app/base/components/DHCPTable/DHCPTable.tsx
index 21d67c32bc..edd41b4494 100644
--- a/src/app/base/components/DHCPTable/DHCPTable.tsx
+++ b/src/app/base/components/DHCPTable/DHCPTable.tsx
@@ -3,7 +3,7 @@ import { useState } from "react";
import { ExternalLink } from "@canonical/maas-react-components";
import { List, MainTable } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import TitledSection from "../TitledSection";
diff --git a/src/app/base/components/DeviceLink/DeviceLink.test.tsx b/src/app/base/components/DeviceLink/DeviceLink.test.tsx
index ef06317574..55f952ee11 100644
--- a/src/app/base/components/DeviceLink/DeviceLink.test.tsx
+++ b/src/app/base/components/DeviceLink/DeviceLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeviceLink, { Labels } from "./DeviceLink";
@@ -19,9 +18,7 @@ it("handles when devices are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a device does not exist", () => {
const { container } = render(
-
-
-
+
);
@@ -56,9 +51,7 @@ it("renders a link if devices have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/DeviceLink/DeviceLink.tsx b/src/app/base/components/DeviceLink/DeviceLink.tsx
index 02e3206ad2..457060056f 100644
--- a/src/app/base/components/DeviceLink/DeviceLink.tsx
+++ b/src/app/base/components/DeviceLink/DeviceLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/DhcpForm/DhcpForm.test.tsx b/src/app/base/components/DhcpForm/DhcpForm.test.tsx
index c38e9f16e8..4463abce2a 100644
--- a/src/app/base/components/DhcpForm/DhcpForm.test.tsx
+++ b/src/app/base/components/DhcpForm/DhcpForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as FieldLabels } from "../DhcpFormFields";
@@ -50,9 +49,7 @@ describe("DhcpForm", () => {
const { unmount } = render(
-
-
-
+
);
@@ -71,9 +68,7 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
@@ -104,9 +99,7 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
@@ -146,9 +139,7 @@ describe("DhcpForm", () => {
const Proxy = ({ analyticsCategory }: { analyticsCategory: string }) => (
-
-
-
+
);
@@ -172,9 +163,7 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
@@ -194,9 +183,7 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
@@ -212,12 +199,10 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
@@ -246,12 +231,10 @@ describe("DhcpForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx b/src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx
index 24d26c934f..8da85b0c32 100644
--- a/src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx
+++ b/src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx
@@ -1,7 +1,6 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels } from "./DhcpFormFields";
@@ -94,12 +93,10 @@ describe("DhcpFormFields", () => {
render(
-
-
-
+
);
@@ -120,9 +117,7 @@ describe("DhcpFormFields", () => {
render(
-
-
-
+
);
@@ -143,9 +138,7 @@ describe("DhcpFormFields", () => {
render(
-
-
-
+
);
@@ -166,9 +159,7 @@ describe("DhcpFormFields", () => {
render(
-
-
-
+
);
@@ -193,9 +184,7 @@ describe("DhcpFormFields", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/FabricLink/FabricLink.test.tsx b/src/app/base/components/FabricLink/FabricLink.test.tsx
index a958b92341..804a7c1dc1 100644
--- a/src/app/base/components/FabricLink/FabricLink.test.tsx
+++ b/src/app/base/components/FabricLink/FabricLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FabricLink, { Labels } from "./FabricLink";
@@ -19,9 +18,7 @@ it("handles when fabrics are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a fabric does not exist", () => {
const { container } = render(
-
-
-
+
);
@@ -56,9 +51,7 @@ it("renders a link if fabrics have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/FabricLink/FabricLink.tsx b/src/app/base/components/FabricLink/FabricLink.tsx
index 82f62aff41..258460a5a6 100644
--- a/src/app/base/components/FabricLink/FabricLink.tsx
+++ b/src/app/base/components/FabricLink/FabricLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/FormikForm/FormikForm.test.tsx b/src/app/base/components/FormikForm/FormikForm.test.tsx
index cd2baf1895..175199a57f 100644
--- a/src/app/base/components/FormikForm/FormikForm.test.tsx
+++ b/src/app/base/components/FormikForm/FormikForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FormikForm from "./FormikForm";
@@ -28,15 +27,13 @@ describe("FormikForm", () => {
render(
-
-
- Content
-
-
+
+ Content
+
);
diff --git a/src/app/base/components/FormikFormContent/FormikFormContent.test.tsx b/src/app/base/components/FormikFormContent/FormikFormContent.test.tsx
index 9103a50b3b..63900d700e 100644
--- a/src/app/base/components/FormikFormContent/FormikFormContent.test.tsx
+++ b/src/app/base/components/FormikFormContent/FormikFormContent.test.tsx
@@ -1,7 +1,6 @@
import { Field, Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import * as Yup from "yup";
@@ -22,8 +21,8 @@ import {
const mockStore = configureStore();
const mockUseNavigate = vi.fn();
-vi.mock("react-router-dom-v5-compat", async () => {
- const actual: object = await vi.importActual("react-router-dom-v5-compat");
+vi.mock("react-router-dom", async () => {
+ const actual: object = await vi.importActual("react-router-dom");
return {
...actual,
useNavigate: () => mockUseNavigate,
@@ -270,17 +269,15 @@ describe("FormikFormContent", () => {
const Proxy = ({ saved }: { saved: boolean }) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -305,17 +302,15 @@ describe("FormikFormContent", () => {
const Proxy = ({ saved }: { saved: boolean }) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -341,13 +336,11 @@ describe("FormikFormContent", () => {
const Proxy = ({ saved }: { saved: boolean }) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -378,17 +371,15 @@ describe("FormikFormContent", () => {
const Proxy = ({ errors, saved }: { errors?: string; saved: boolean }) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -411,17 +402,15 @@ describe("FormikFormContent", () => {
}) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -447,18 +436,16 @@ describe("FormikFormContent", () => {
}) => (
-
-
-
-
-
-
-
+
+
+
+
+
);
@@ -478,16 +465,14 @@ describe("FormikFormContent", () => {
render(
-
-
- }
- onCancel={vi.fn()}
- >
- Content
-
-
-
+
+ }
+ onCancel={vi.fn()}
+ >
+ Content
+
+
);
diff --git a/src/app/base/components/FormikFormContent/FormikFormContent.tsx b/src/app/base/components/FormikFormContent/FormikFormContent.tsx
index a3261ed900..a74d483df0 100644
--- a/src/app/base/components/FormikFormContent/FormikFormContent.tsx
+++ b/src/app/base/components/FormikFormContent/FormikFormContent.tsx
@@ -7,7 +7,7 @@ import type { FormikContextType } from "formik";
import { useFormikContext } from "formik";
import { withFormikDevtools } from "formik-devtools-extension";
import { useDispatch } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import type { AnyAction } from "redux";
import type { FormikFormButtonsProps } from "@/app/base/components/FormikFormButtons";
diff --git a/src/app/base/components/MachineLink/MachineLink.test.tsx b/src/app/base/components/MachineLink/MachineLink.test.tsx
index d4e4c27e8a..993b0daac1 100644
--- a/src/app/base/components/MachineLink/MachineLink.test.tsx
+++ b/src/app/base/components/MachineLink/MachineLink.test.tsx
@@ -1,7 +1,6 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MachineLink, { Labels } from "./MachineLink";
@@ -52,9 +51,7 @@ it("handles when a machine does not exist", () => {
const { container } = render(
-
-
-
+
);
@@ -71,9 +68,7 @@ it("renders a link if machines have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/MachineLink/MachineLink.tsx b/src/app/base/components/MachineLink/MachineLink.tsx
index 2b1dbd8f21..799d6c6574 100644
--- a/src/app/base/components/MachineLink/MachineLink.tsx
+++ b/src/app/base/components/MachineLink/MachineLink.tsx
@@ -1,5 +1,5 @@
import { Spinner } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import urls from "@/app/base/urls";
import type { Machine, MachineMeta } from "@/app/store/machine/types";
diff --git a/src/app/base/components/ModelNotFound/ModelNotFound.test.tsx b/src/app/base/components/ModelNotFound/ModelNotFound.test.tsx
index 8ceeba77f6..93b92ba879 100644
--- a/src/app/base/components/ModelNotFound/ModelNotFound.test.tsx
+++ b/src/app/base/components/ModelNotFound/ModelNotFound.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ModelNotFound from "./ModelNotFound";
@@ -17,9 +16,7 @@ describe("ModelNotFound", () => {
render(
-
-
-
+
);
@@ -33,9 +30,7 @@ describe("ModelNotFound", () => {
render(
-
-
-
+
);
@@ -51,14 +46,12 @@ describe("ModelNotFound", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/ModelNotFound/ModelNotFound.tsx b/src/app/base/components/ModelNotFound/ModelNotFound.tsx
index eaf3368d8e..de078b295a 100644
--- a/src/app/base/components/ModelNotFound/ModelNotFound.tsx
+++ b/src/app/base/components/ModelNotFound/ModelNotFound.tsx
@@ -1,4 +1,4 @@
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import PageContent from "../PageContent";
diff --git a/src/app/base/components/NodeConfigurationFields/NodeConfigurationFields.test.tsx b/src/app/base/components/NodeConfigurationFields/NodeConfigurationFields.test.tsx
index 4ec93aa8d0..cf76f86d18 100644
--- a/src/app/base/components/NodeConfigurationFields/NodeConfigurationFields.test.tsx
+++ b/src/app/base/components/NodeConfigurationFields/NodeConfigurationFields.test.tsx
@@ -1,7 +1,6 @@
import { Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import NodeConfigurationFields, { Label } from "./NodeConfigurationFields";
@@ -51,11 +50,9 @@ it("can open a create tag form", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -82,11 +79,9 @@ it("does not display automatic tags on the list", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -108,11 +103,9 @@ it("updates the new tags after creating a tag", async () => {
const Form = ({ tags }: { tags: Tag[TagMeta.PK][] }) => (
-
-
-
-
-
+
+
+
);
diff --git a/src/app/base/components/NodeSummaryNetworkCard/NodeSummaryNetworkCard.tsx b/src/app/base/components/NodeSummaryNetworkCard/NodeSummaryNetworkCard.tsx
index 9ba61633ad..ddd5885ea6 100644
--- a/src/app/base/components/NodeSummaryNetworkCard/NodeSummaryNetworkCard.tsx
+++ b/src/app/base/components/NodeSummaryNetworkCard/NodeSummaryNetworkCard.tsx
@@ -3,7 +3,7 @@ import { Fragment } from "react";
import { Card, Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import NetworkCardTable from "./NetworkCardTable";
diff --git a/src/app/base/components/NotificationGroup/Notification/Notification.tsx b/src/app/base/components/NotificationGroup/Notification/Notification.tsx
index 2e85c7f95d..82a66f40d7 100644
--- a/src/app/base/components/NotificationGroup/Notification/Notification.tsx
+++ b/src/app/base/components/NotificationGroup/Notification/Notification.tsx
@@ -1,7 +1,7 @@
import { Notification } from "@canonical/react-components";
import type { NotificationProps } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import settingsURLs from "@/app/settings/urls";
import authSelectors from "@/app/store/auth/selectors";
diff --git a/src/app/base/components/PageContent/PageContent.tsx b/src/app/base/components/PageContent/PageContent.tsx
index 86f7d3b040..dd5efba575 100644
--- a/src/app/base/components/PageContent/PageContent.tsx
+++ b/src/app/base/components/PageContent/PageContent.tsx
@@ -2,7 +2,7 @@ import type { HTMLProps, ReactNode } from "react";
import classNames from "classnames";
import { useSelector } from "react-redux";
-import { matchPath, useLocation } from "react-router-dom-v5-compat";
+import { matchPath, useLocation } from "react-router-dom";
import AppSidePanel from "../AppSidePanel";
import ErrorBoundary from "../ErrorBoundary/ErrorBoundary";
diff --git a/src/app/base/components/SSHKeyList/SSHKeyList.tsx b/src/app/base/components/SSHKeyList/SSHKeyList.tsx
index 10153a485b..65120d7d30 100644
--- a/src/app/base/components/SSHKeyList/SSHKeyList.tsx
+++ b/src/app/base/components/SSHKeyList/SSHKeyList.tsx
@@ -2,8 +2,8 @@ import type { ReactNode } from "react";
import { Button, Notification } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import type { NavigateFunction } from "react-router-dom-v5-compat";
-import { useNavigate } from "react-router-dom-v5-compat";
+import type { NavigateFunction } from "react-router-dom";
+import { useNavigate } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/preferences/urls";
diff --git a/src/app/base/components/SecondaryNavigation/SecondaryNavigation.tsx b/src/app/base/components/SecondaryNavigation/SecondaryNavigation.tsx
index 4a46fad1d8..bff4b73e87 100644
--- a/src/app/base/components/SecondaryNavigation/SecondaryNavigation.tsx
+++ b/src/app/base/components/SecondaryNavigation/SecondaryNavigation.tsx
@@ -1,6 +1,6 @@
import classNames from "classnames";
-import type { Location } from "react-router-dom-v5-compat";
-import { Link, matchPath, useLocation } from "react-router-dom-v5-compat";
+import type { Location } from "react-router-dom";
+import { Link, matchPath, useLocation } from "react-router-dom";
import { useThemeContext } from "@/app/base/theme-context";
diff --git a/src/app/base/components/SpaceLink/SpaceLink.test.tsx b/src/app/base/components/SpaceLink/SpaceLink.test.tsx
index d5c1511431..4726d26d62 100644
--- a/src/app/base/components/SpaceLink/SpaceLink.test.tsx
+++ b/src/app/base/components/SpaceLink/SpaceLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SpaceLink from "./SpaceLink";
@@ -19,9 +18,7 @@ it("handles when spaces are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a space does not exist", () => {
render(
-
-
-
+
);
@@ -57,9 +52,7 @@ it("renders a link if spaces have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/SpaceLink/SpaceLink.tsx b/src/app/base/components/SpaceLink/SpaceLink.tsx
index 155519c9f0..730f4ba369 100644
--- a/src/app/base/components/SpaceLink/SpaceLink.tsx
+++ b/src/app/base/components/SpaceLink/SpaceLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/SubnetLink/SubnetLink.test.tsx b/src/app/base/components/SubnetLink/SubnetLink.test.tsx
index 4c3af8668f..1b47b0a1be 100644
--- a/src/app/base/components/SubnetLink/SubnetLink.test.tsx
+++ b/src/app/base/components/SubnetLink/SubnetLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SubnetLink from "./SubnetLink";
@@ -19,9 +18,7 @@ it("handles when subnets are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a subnet does not exist", () => {
render(
-
-
-
+
);
@@ -57,9 +52,7 @@ it("renders a link if subnets have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/SubnetLink/SubnetLink.tsx b/src/app/base/components/SubnetLink/SubnetLink.tsx
index 150bd75397..e38ea4a233 100644
--- a/src/app/base/components/SubnetLink/SubnetLink.tsx
+++ b/src/app/base/components/SubnetLink/SubnetLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/TableActions/TableActions.tsx b/src/app/base/components/TableActions/TableActions.tsx
index 1168a861be..4564815d5b 100644
--- a/src/app/base/components/TableActions/TableActions.tsx
+++ b/src/app/base/components/TableActions/TableActions.tsx
@@ -1,5 +1,5 @@
import { Button, Tooltip } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import CopyButton from "@/app/base/components/CopyButton";
diff --git a/src/app/base/components/TagLinks/TagLinks.test.tsx b/src/app/base/components/TagLinks/TagLinks.test.tsx
index 0790fd4033..fbd9ec572a 100644
--- a/src/app/base/components/TagLinks/TagLinks.test.tsx
+++ b/src/app/base/components/TagLinks/TagLinks.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import TagLinks from "./TagLinks";
@@ -11,12 +10,10 @@ describe("TagLinks", () => {
-
- `www.tags.com/${tag}`}
- tags={["tag-1", "tag-2"]}
- />
-
+ `www.tags.com/${tag}`}
+ tags={["tag-1", "tag-2"]}
+ />
);
diff --git a/src/app/base/components/TagLinks/TagLinks.tsx b/src/app/base/components/TagLinks/TagLinks.tsx
index 2be7c4135c..7dd7514878 100644
--- a/src/app/base/components/TagLinks/TagLinks.tsx
+++ b/src/app/base/components/TagLinks/TagLinks.tsx
@@ -1,4 +1,4 @@
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { Tag } from "@/app/store/tag/types";
diff --git a/src/app/base/components/VLANLink/VLANLink.test.tsx b/src/app/base/components/VLANLink/VLANLink.test.tsx
index 5bd5340aa5..42213a7ef2 100644
--- a/src/app/base/components/VLANLink/VLANLink.test.tsx
+++ b/src/app/base/components/VLANLink/VLANLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VLANLink from "./VLANLink";
@@ -19,9 +18,7 @@ it("handles when VLANs are loading", () => {
render(
-
-
-
+
);
@@ -37,9 +34,7 @@ it("handles when a VLAN does not exist", () => {
const { container } = render(
-
-
-
+
);
@@ -56,9 +51,7 @@ it("renders a link if VLANs have loaded and it exists", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/VLANLink/VLANLink.tsx b/src/app/base/components/VLANLink/VLANLink.tsx
index a30b74fcab..76273cd691 100644
--- a/src/app/base/components/VLANLink/VLANLink.tsx
+++ b/src/app/base/components/VLANLink/VLANLink.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/base/components/VaultNotification/VaultNotification.tsx b/src/app/base/components/VaultNotification/VaultNotification.tsx
index d0737f041c..e07ca7750e 100644
--- a/src/app/base/components/VaultNotification/VaultNotification.tsx
+++ b/src/app/base/components/VaultNotification/VaultNotification.tsx
@@ -1,6 +1,6 @@
import { Notification } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import controllerSelectors from "@/app/store/controller/selectors";
import { vaultEnabled as vaultEnabledSelectors } from "@/app/store/general/selectors";
diff --git a/src/app/base/components/node/MachinesHeader/MachinesHeader.test.tsx b/src/app/base/components/node/MachinesHeader/MachinesHeader.test.tsx
index 6f069212ff..a3f757db98 100644
--- a/src/app/base/components/node/MachinesHeader/MachinesHeader.test.tsx
+++ b/src/app/base/components/node/MachinesHeader/MachinesHeader.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MachinesHeader from "./MachinesHeader";
@@ -45,9 +44,7 @@ describe("MachinesHeader", () => {
-
-
-
+
);
diff --git a/src/app/base/components/node/NodeDevices/NodeDevices.tsx b/src/app/base/components/node/NodeDevices/NodeDevices.tsx
index 5701a86f56..56dbd7f049 100644
--- a/src/app/base/components/node/NodeDevices/NodeDevices.tsx
+++ b/src/app/base/components/node/NodeDevices/NodeDevices.tsx
@@ -4,7 +4,7 @@ import { useEffect } from "react";
import classNames from "classnames";
import pluralize from "pluralize";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import NodeDevicesWarning from "./NodeDevicesWarning";
diff --git a/src/app/base/components/node/NodeLink/NodeLink.test.tsx b/src/app/base/components/node/NodeLink/NodeLink.test.tsx
index c1ac1ffc23..2a993989ce 100644
--- a/src/app/base/components/node/NodeLink/NodeLink.test.tsx
+++ b/src/app/base/components/node/NodeLink/NodeLink.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import NodeLink from "./NodeLink";
@@ -26,12 +25,10 @@ it("can render a controller link", () => {
render(
-
-
-
+
);
@@ -51,9 +48,7 @@ it("can render a device link", () => {
render(
-
-
-
+
);
@@ -73,9 +68,7 @@ it("can render a machine link", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/NodeLogs/NodeLogs.tsx b/src/app/base/components/node/NodeLogs/NodeLogs.tsx
index dc7aa5afad..1556bd7612 100644
--- a/src/app/base/components/node/NodeLogs/NodeLogs.tsx
+++ b/src/app/base/components/node/NodeLogs/NodeLogs.tsx
@@ -1,6 +1,5 @@
import { Tabs } from "@canonical/react-components";
-import { Route, useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { Route, useLocation, Link, Routes } from "react-router-dom";
import DownloadMenu from "./DownloadMenu";
import EventLogs from "./EventLogs";
@@ -53,19 +52,15 @@ const NodeLogs = ({ node, urls }: Props): JSX.Element => {
/>
- }
- />
- {[urls.index(null), urls.events(null)].map((path) => (
+
}
+ element={}
+ path={urls.installationOutput(null)}
/>
- ))}
+ {[urls.index(null), urls.events(null)].map((path) => (
+ } key={path} path={path} />
+ ))}
+
>
);
};
diff --git a/src/app/base/components/node/NodeTestDetails/NodeTestDetails.tsx b/src/app/base/components/node/NodeTestDetails/NodeTestDetails.tsx
index adbe283fee..3649880dc8 100644
--- a/src/app/base/components/node/NodeTestDetails/NodeTestDetails.tsx
+++ b/src/app/base/components/node/NodeTestDetails/NodeTestDetails.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { Col, Row, Spinner, Tooltip } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import NodeTestDetailsLogs from "./NodeTestDetailsLogs";
diff --git a/src/app/base/components/node/NodeTestsTable/TestActions/TestActions.tsx b/src/app/base/components/node/NodeTestsTable/TestActions/TestActions.tsx
index 40bea7bca1..a408abdaa6 100644
--- a/src/app/base/components/node/NodeTestsTable/TestActions/TestActions.tsx
+++ b/src/app/base/components/node/NodeTestsTable/TestActions/TestActions.tsx
@@ -1,6 +1,6 @@
import type { ContextualMenuProps } from "@canonical/react-components";
import type { LinkProps } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { SetExpanded } from "../NodeTestsTable";
import { ScriptResultAction } from "../NodeTestsTable";
diff --git a/src/app/base/components/node/NodeTestsTable/TestHistory/TestHistory.tsx b/src/app/base/components/node/NodeTestsTable/TestHistory/TestHistory.tsx
index fd09df8a46..5c329f20f9 100644
--- a/src/app/base/components/node/NodeTestsTable/TestHistory/TestHistory.tsx
+++ b/src/app/base/components/node/NodeTestsTable/TestHistory/TestHistory.tsx
@@ -3,7 +3,7 @@ import { useEffect } from "react";
import { Button, Spinner } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link, useLocation } from "react-router-dom-v5-compat";
+import { Link, useLocation } from "react-router-dom";
import ScriptStatus from "@/app/base/components/ScriptStatus";
import type { RootState } from "@/app/store/root/types";
diff --git a/src/app/base/components/node/OverviewCard/CpuCard/CpuCard.test.tsx b/src/app/base/components/node/OverviewCard/CpuCard/CpuCard.test.tsx
index cffa98a016..8c5d0a61c2 100644
--- a/src/app/base/components/node/OverviewCard/CpuCard/CpuCard.test.tsx
+++ b/src/app/base/components/node/OverviewCard/CpuCard/CpuCard.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import CpuCard from "./CpuCard";
@@ -32,9 +31,7 @@ it("renders the cpu subtext", () => {
-
-
-
+
);
@@ -52,9 +49,7 @@ it("renders the cpu subtext for slower CPUs", () => {
-
-
-
+
);
@@ -70,9 +65,7 @@ it("does not render test info if node is a controller", () => {
render(
-
-
-
+
);
@@ -86,9 +79,7 @@ it("renders test info if node is a machine", () => {
render(
-
-
-
+
);
@@ -108,9 +99,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -130,9 +119,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -151,9 +138,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -173,9 +158,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -195,9 +178,7 @@ describe("node is a machine", () => {
-
-
-
+
);
diff --git a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx
index 784b74b727..f6b444f7a2 100644
--- a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx
+++ b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx
@@ -1,7 +1,7 @@
import { Spinner } from "@canonical/react-components";
import classNames from "classnames";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import {
useFetchActions,
diff --git a/src/app/base/components/node/OverviewCard/MemoryCard/MemoryCard.test.tsx b/src/app/base/components/node/OverviewCard/MemoryCard/MemoryCard.test.tsx
index 84589bcea4..d03e88988d 100644
--- a/src/app/base/components/node/OverviewCard/MemoryCard/MemoryCard.test.tsx
+++ b/src/app/base/components/node/OverviewCard/MemoryCard/MemoryCard.test.tsx
@@ -2,7 +2,6 @@ import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MemoryCard from "./MemoryCard";
@@ -33,9 +32,7 @@ it("does not render test info if node is a controller", () => {
render(
-
-
-
+
);
@@ -53,9 +50,7 @@ it("renders test info if node is a machine", async () => {
render(
-
-
-
+
);
@@ -79,9 +74,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -104,9 +97,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -128,9 +119,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -152,9 +141,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -176,9 +163,7 @@ describe("node is a machine", () => {
-
-
-
+
);
diff --git a/src/app/base/components/node/OverviewCard/OverviewCard.test.tsx b/src/app/base/components/node/OverviewCard/OverviewCard.test.tsx
index b075d43fff..2d77afc18c 100644
--- a/src/app/base/components/node/OverviewCard/OverviewCard.test.tsx
+++ b/src/app/base/components/node/OverviewCard/OverviewCard.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import OverviewCard from "./OverviewCard";
@@ -21,9 +20,7 @@ it("renders a controller status section if node is a controller", () => {
render(
-
-
-
+
);
@@ -43,9 +40,7 @@ it("renders a machine status section if node is a machine", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/OverviewCard/StorageCard/StorageCard.test.tsx b/src/app/base/components/node/OverviewCard/StorageCard/StorageCard.test.tsx
index da4a2e6fc6..7cb81e0466 100644
--- a/src/app/base/components/node/OverviewCard/StorageCard/StorageCard.test.tsx
+++ b/src/app/base/components/node/OverviewCard/StorageCard/StorageCard.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import StorageCard from "./StorageCard";
@@ -29,9 +28,7 @@ it("does not render test info if node is a controller", () => {
render(
-
-
-
+
);
@@ -47,9 +44,7 @@ it("renders test info if node is a machine", () => {
render(
-
-
-
+
);
@@ -71,9 +66,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -95,9 +88,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -118,9 +109,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -141,9 +130,7 @@ describe("node is a machine", () => {
-
-
-
+
);
@@ -162,9 +149,7 @@ describe("node is a machine", () => {
-
-
-
+
);
diff --git a/src/app/base/components/node/SetZoneForm/SetZoneForm.test.tsx b/src/app/base/components/node/SetZoneForm/SetZoneForm.test.tsx
index db6904ae11..55c9163db3 100644
--- a/src/app/base/components/node/SetZoneForm/SetZoneForm.test.tsx
+++ b/src/app/base/components/node/SetZoneForm/SetZoneForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SetZoneForm from "./SetZoneForm";
@@ -30,16 +29,14 @@ it("initialises zone value if exactly one node provided", () => {
render(
-
-
-
+
);
@@ -56,16 +53,14 @@ it("does not initialise zone value if more than one node provided", () => {
render(
-
-
-
+
);
@@ -83,16 +78,14 @@ it("correctly runs function to set zones of given nodes", async () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/StorageTables/AvailableStorageTable/AvailableStorageTable.test.tsx b/src/app/base/components/node/StorageTables/AvailableStorageTable/AvailableStorageTable.test.tsx
index 924b2b827d..ca28bc2fa5 100644
--- a/src/app/base/components/node/StorageTables/AvailableStorageTable/AvailableStorageTable.test.tsx
+++ b/src/app/base/components/node/StorageTables/AvailableStorageTable/AvailableStorageTable.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AvailableStorageTable from "./AvailableStorageTable";
@@ -56,9 +55,7 @@ it("can show an empty message", () => {
render(
-
-
-
+
);
@@ -91,9 +88,7 @@ it("only shows disks that are available", () => {
render(
-
-
-
+
);
@@ -121,9 +116,7 @@ it("does not show an action column, checkboxes or bulk actions if node is a cont
render(
-
-
-
+
);
@@ -154,9 +147,7 @@ it("show an action column, storage checkboxes and bulk actions if node is a mach
render(
-
-
-
+
);
@@ -186,9 +177,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -213,9 +202,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -243,9 +230,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -340,9 +325,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -408,9 +391,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -493,9 +474,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -532,9 +511,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
@@ -575,9 +552,7 @@ describe("performing machine actions", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/StorageTables/FilesystemsTable/AddSpecialFilesystem/AddSpecialFilesystem.test.tsx b/src/app/base/components/node/StorageTables/FilesystemsTable/AddSpecialFilesystem/AddSpecialFilesystem.test.tsx
index 67970b08fb..d74ccd71a6 100644
--- a/src/app/base/components/node/StorageTables/FilesystemsTable/AddSpecialFilesystem/AddSpecialFilesystem.test.tsx
+++ b/src/app/base/components/node/StorageTables/FilesystemsTable/AddSpecialFilesystem/AddSpecialFilesystem.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddSpecialFilesystem from "./AddSpecialFilesystem";
@@ -31,9 +30,7 @@ it("only shows filesystems that do not require a storage device", () => {
render(
-
-
-
+
);
@@ -65,9 +62,7 @@ it("can show errors", () => {
render(
-
-
-
+
);
@@ -92,9 +87,7 @@ it("correctly dispatches an action to mount a special filesystem", async () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/StorageTables/FilesystemsTable/FilesystemsTable.test.tsx b/src/app/base/components/node/StorageTables/FilesystemsTable/FilesystemsTable.test.tsx
index bb0a0dd652..c41d816d59 100644
--- a/src/app/base/components/node/StorageTables/FilesystemsTable/FilesystemsTable.test.tsx
+++ b/src/app/base/components/node/StorageTables/FilesystemsTable/FilesystemsTable.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FilesystemsTable from "./FilesystemsTable";
@@ -43,9 +42,7 @@ it("can show an empty message", () => {
render(
-
-
-
+
);
@@ -70,9 +67,7 @@ it("can show filesystems associated with disks", () => {
render(
-
-
-
+
);
@@ -109,9 +104,7 @@ it("can show filesystems associated with partitions", () => {
render(
-
-
-
+
);
@@ -143,9 +136,7 @@ it("can show special filesystems", () => {
render(
-
-
-
+
);
@@ -173,9 +164,7 @@ it("does not show action column if node is a controller", () => {
render(
-
-
-
+
);
@@ -205,9 +194,7 @@ it("shows an action column if node is a machine", () => {
render(
-
-
-
+
);
@@ -237,9 +224,7 @@ it("disables the action menu if node is a machine and storage can't be edited",
render(
-
-
-
+
);
@@ -265,9 +250,7 @@ it("can remove a disk's filesystem if node is a machine", async () => {
render(
-
-
-
+
);
@@ -301,9 +284,7 @@ it("can remove a partition's filesystem if node is a machine", async () => {
render(
-
-
-
+
);
@@ -339,9 +320,7 @@ it("can remove a special filesystem if node is a machine", async () => {
render(
-
-
-
+
);
@@ -376,9 +355,7 @@ it("can unmount a disk's filesystem if node is a machine", async () => {
render(
-
-
-
+
);
@@ -412,9 +389,7 @@ it("can unmount a partition's filesystem if node is a machine", async () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/StorageTables/UsedStorageTable/UsedStorageTable.test.tsx b/src/app/base/components/node/StorageTables/UsedStorageTable/UsedStorageTable.test.tsx
index d49da2bbdf..3db2e14c3f 100644
--- a/src/app/base/components/node/StorageTables/UsedStorageTable/UsedStorageTable.test.tsx
+++ b/src/app/base/components/node/StorageTables/UsedStorageTable/UsedStorageTable.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import UsedStorageTable from "./UsedStorageTable";
@@ -18,9 +17,7 @@ it("can show an empty message", () => {
});
render(
-
-
-
+
);
@@ -51,9 +48,7 @@ it("only shows disks that are being used", () => {
render(
-
-
-
+
);
@@ -82,9 +77,7 @@ it("can render storage tag links for a controller", () => {
render(
-
-
-
+
);
@@ -111,9 +104,7 @@ it("can render storage tag links for a machine", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/TestResults/TestResults.test.tsx b/src/app/base/components/node/TestResults/TestResults.test.tsx
index 94ea0a9d52..956610794f 100644
--- a/src/app/base/components/node/TestResults/TestResults.test.tsx
+++ b/src/app/base/components/node/TestResults/TestResults.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TestResults from "./TestResults";
@@ -33,13 +32,11 @@ describe("TestResults", () => {
-
-
-
+
);
@@ -61,13 +58,11 @@ describe("TestResults", () => {
-
-
-
+
);
@@ -88,13 +83,11 @@ describe("TestResults", () => {
-
-
-
+
);
@@ -115,13 +108,11 @@ describe("TestResults", () => {
-
-
-
+
);
@@ -142,13 +133,11 @@ describe("TestResults", () => {
-
-
-
+
);
diff --git a/src/app/base/components/node/TestResults/TestResults.tsx b/src/app/base/components/node/TestResults/TestResults.tsx
index 240aa8dc75..bb56e444a9 100644
--- a/src/app/base/components/node/TestResults/TestResults.tsx
+++ b/src/app/base/components/node/TestResults/TestResults.tsx
@@ -1,5 +1,5 @@
import { Button, Icon, ICONS, Tooltip } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { HardwareType } from "@/app/base/enum";
import { useSendAnalytics } from "@/app/base/hooks";
diff --git a/src/app/base/components/node/networking/FabricColumn/FabricColumn.test.tsx b/src/app/base/components/node/networking/FabricColumn/FabricColumn.test.tsx
index 51f159f5ae..32c3a02c14 100644
--- a/src/app/base/components/node/networking/FabricColumn/FabricColumn.test.tsx
+++ b/src/app/base/components/node/networking/FabricColumn/FabricColumn.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FabricColumn from "./FabricColumn";
@@ -41,9 +40,7 @@ describe("FabricColumn", () => {
render(
-
-
-
+
);
@@ -68,9 +65,7 @@ describe("FabricColumn", () => {
render(
-
-
-
+
);
diff --git a/src/app/base/components/node/networking/FabricColumn/FabricColumn.tsx b/src/app/base/components/node/networking/FabricColumn/FabricColumn.tsx
index 809c43bea9..ad273118dd 100644
--- a/src/app/base/components/node/networking/FabricColumn/FabricColumn.tsx
+++ b/src/app/base/components/node/networking/FabricColumn/FabricColumn.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import fabricSelectors from "@/app/store/fabric/selectors";
diff --git a/src/app/base/components/node/networking/SubnetColumn/SubnetColumn.tsx b/src/app/base/components/node/networking/SubnetColumn/SubnetColumn.tsx
index a0e6b19fa6..49a9f09b07 100644
--- a/src/app/base/components/node/networking/SubnetColumn/SubnetColumn.tsx
+++ b/src/app/base/components/node/networking/SubnetColumn/SubnetColumn.tsx
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import { useIsAllNetworkingDisabled } from "@/app/base/hooks";
diff --git a/src/app/base/hooks/analytics.ts b/src/app/base/hooks/analytics.ts
index 72837ae42c..8549a84693 100644
--- a/src/app/base/hooks/analytics.ts
+++ b/src/app/base/hooks/analytics.ts
@@ -1,7 +1,7 @@
import { useCallback, useEffect } from "react";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom-v5-compat";
+import { useLocation } from "react-router-dom";
import type { UsabillaLive } from "@/app/base/types";
import authSelectors from "@/app/store/auth/selectors";
diff --git a/src/app/base/hooks/urls.test.tsx b/src/app/base/hooks/urls.test.tsx
index c4a9980c18..0d96beecde 100644
--- a/src/app/base/hooks/urls.test.tsx
+++ b/src/app/base/hooks/urls.test.tsx
@@ -2,8 +2,7 @@ import type { ReactNode } from "react";
import { renderHook } from "@testing-library/react";
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import { useGetURLId } from "./urls";
@@ -18,11 +17,9 @@ const generateWrapper =
(
-
-
- {children}>} path={route} />
-
-
+
+ {children}>} path={route} />
+
);
diff --git a/src/app/base/hooks/urls.ts b/src/app/base/hooks/urls.ts
index a97375e3ca..f497a53c7c 100644
--- a/src/app/base/hooks/urls.ts
+++ b/src/app/base/hooks/urls.ts
@@ -1,6 +1,6 @@
import { useMemo } from "react";
-import { useLocation, useParams } from "react-router-dom-v5-compat";
+import { useLocation, useParams } from "react-router-dom";
import { parseNumberId } from "@/app/utils";
diff --git a/src/app/controllers/views/ControllerDetails/ControllerConfiguration/ControllerConfiguration.test.tsx b/src/app/controllers/views/ControllerDetails/ControllerConfiguration/ControllerConfiguration.test.tsx
index 5e4dee57b6..632ef88b2b 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerConfiguration/ControllerConfiguration.test.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerConfiguration/ControllerConfiguration.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerConfiguration from "./ControllerConfiguration";
@@ -64,9 +63,7 @@ it("displays controller configuration sections", async () => {
render(
-
-
-
+
);
@@ -85,9 +82,7 @@ it("displays a loading indicator if the controller has not loaded", () => {
render(
-
-
-
+
);
@@ -102,9 +97,7 @@ it("displays non-editable controller details by default", () => {
render(
-
-
-
+
);
@@ -128,9 +121,7 @@ it("can switch to controller configuration forms", async () => {
render(
-
-
-
+
);
@@ -166,9 +157,7 @@ it("correctly dispatches an action to update a controller", async () => {
render(
-
-
-
+
);
@@ -214,9 +203,7 @@ it("displays an alert on edit when controller manages more than 1 node", async (
render(
-
-
-
+
);
diff --git a/src/app/controllers/views/ControllerDetails/ControllerDetails.test.tsx b/src/app/controllers/views/ControllerDetails/ControllerDetails.test.tsx
index d0ea464371..836e9498af 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerDetails.test.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerDetails.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import type { Mock } from "vitest";
@@ -45,14 +44,12 @@ it("gets and sets the controller as active", () => {
},
]}
>
-
-
- }
- path={`${urls.controllers.controller.index(null)}/*`}
- />
-
-
+
+ }
+ path={`${urls.controllers.controller.index(null)}/*`}
+ />
+
);
@@ -92,14 +89,12 @@ it("unsets active controller and cleans up when unmounting", () => {
},
]}
>
-
-
- }
- path={`${urls.controllers.controller.index(null)}/*`}
- />
-
-
+
+ }
+ path={`${urls.controllers.controller.index(null)}/*`}
+ />
+
);
@@ -144,14 +139,12 @@ it("displays a message if the controller does not exist", () => {
},
]}
>
-
-
- }
- path={`${urls.controllers.controller.index(null)}/*`}
- />
-
-
+
+ }
+ path={`${urls.controllers.controller.index(null)}/*`}
+ />
+
);
@@ -182,14 +175,12 @@ it("gets and sets the controller as active only once when navigating within the
},
]}
>
-
-
- }
- path={`${urls.controllers.controller.index(null)}/*`}
- />
-
-
+
+ }
+ path={`${urls.controllers.controller.index(null)}/*`}
+ />
+
);
diff --git a/src/app/controllers/views/ControllerDetails/ControllerDetails.tsx b/src/app/controllers/views/ControllerDetails/ControllerDetails.tsx
index b4eaae067c..528293c156 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerDetails.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerDetails.tsx
@@ -1,8 +1,7 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
-import { Routes, Route } from "react-router-dom-v5-compat";
+import { Navigate, Routes, Route } from "react-router-dom";
import ControllerCommissioning from "./ControllerCommissioning";
import ControllerConfiguration from "./ControllerConfiguration";
@@ -90,7 +89,10 @@ const ControllerDetails = (): JSX.Element => {
+
}
index
/>
diff --git a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.test.tsx b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.test.tsx
index e54a8c1372..f22e20f239 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.test.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerDetailsHeader from "./ControllerDetailsHeader";
@@ -23,12 +22,10 @@ it("displays a spinner as the title if controller has not loaded yet", () => {
render(
-
-
-
+
);
@@ -49,12 +46,10 @@ it("displays a spinner as the subtitle if loaded controller is not the detailed
render(
-
-
-
+
);
@@ -75,12 +70,10 @@ it("displays the controller's FQDN once loaded and detailed type", () => {
render(
-
-
-
+
);
@@ -108,12 +101,10 @@ it("displays actions in take action menu", async () => {
render(
-
-
-
+
);
diff --git a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.tsx b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.tsx
index ddc8ee181f..81eb1fe835 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerDetailsHeader.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { useSelector } from "react-redux";
import { useLocation } from "react-router";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import ControllerName from "./ControllerName";
diff --git a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerName/ControllerName.test.tsx b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerName/ControllerName.test.tsx
index 2b6705e6e9..08950dbb0f 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerName/ControllerName.test.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerDetailsHeader/ControllerName/ControllerName.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerName from "./ControllerName";
@@ -49,13 +48,11 @@ it("can update a controller with the new domain", async () => {
},
]}
>
-
-
-
+
);
diff --git a/src/app/controllers/views/ControllerDetails/ControllerStorage/ControllerStorage.test.tsx b/src/app/controllers/views/ControllerDetails/ControllerStorage/ControllerStorage.test.tsx
index 3f28be1f9f..8a8067d06e 100644
--- a/src/app/controllers/views/ControllerDetails/ControllerStorage/ControllerStorage.test.tsx
+++ b/src/app/controllers/views/ControllerDetails/ControllerStorage/ControllerStorage.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerStorage from "./ControllerStorage";
@@ -20,9 +19,7 @@ it("displays a spinner if controller is loading", () => {
render(
-
-
-
+
);
diff --git a/src/app/controllers/views/ControllerList/ControllerList.test.tsx b/src/app/controllers/views/ControllerList/ControllerList.test.tsx
index 63dc8575a4..ee30d01b67 100644
--- a/src/app/controllers/views/ControllerList/ControllerList.test.tsx
+++ b/src/app/controllers/views/ControllerList/ControllerList.test.tsx
@@ -1,7 +1,6 @@
import { Provider } from "react-redux";
-import { useLocation } from "react-router";
+import { Routes, useLocation } from "react-router";
import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ControllerList from "./ControllerList";
@@ -31,9 +30,7 @@ describe("ControllerList", () => {
},
]}
>
-
-
-
+
);
@@ -56,10 +53,10 @@ describe("ControllerList", () => {
{ pathname: "/machines", search: "?q=test+search", key: "testKey" },
]}
>
-
-
- } />
-
+
+
+ } path="*" />
+
);
diff --git a/src/app/controllers/views/ControllerList/ControllerList.tsx b/src/app/controllers/views/ControllerList/ControllerList.tsx
index 42220148c6..781c33e78c 100644
--- a/src/app/controllers/views/ControllerList/ControllerList.tsx
+++ b/src/app/controllers/views/ControllerList/ControllerList.tsx
@@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useLocation } from "react-router";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ControllerListHeader from "./ControllerListHeader";
import ControllerListTable from "./ControllerListTable";
diff --git a/src/app/controllers/views/ControllerList/ControllerListTable/VLANsColumn/VLANsColumn.tsx b/src/app/controllers/views/ControllerList/ControllerListTable/VLANsColumn/VLANsColumn.tsx
index 25a827874e..24a11ddacb 100644
--- a/src/app/controllers/views/ControllerList/ControllerListTable/VLANsColumn/VLANsColumn.tsx
+++ b/src/app/controllers/views/ControllerList/ControllerListTable/VLANsColumn/VLANsColumn.tsx
@@ -1,5 +1,5 @@
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import urls from "@/app/base/urls";
diff --git a/src/app/devices/views/DeviceDetails/DeviceConfiguration/DeviceConfiguration.test.tsx b/src/app/devices/views/DeviceDetails/DeviceConfiguration/DeviceConfiguration.test.tsx
index 5056a64c88..120071de90 100644
--- a/src/app/devices/views/DeviceDetails/DeviceConfiguration/DeviceConfiguration.test.tsx
+++ b/src/app/devices/views/DeviceDetails/DeviceConfiguration/DeviceConfiguration.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeviceConfiguration, { Label } from "./DeviceConfiguration";
@@ -44,9 +43,7 @@ describe("DeviceConfiguration", () => {
render(
-
-
-
+
);
@@ -59,9 +56,7 @@ describe("DeviceConfiguration", () => {
render(
-
-
-
+
);
@@ -77,9 +72,7 @@ describe("DeviceConfiguration", () => {
render(
-
-
-
+
);
@@ -99,9 +92,7 @@ describe("DeviceConfiguration", () => {
render(
-
-
-
+
);
diff --git a/src/app/devices/views/DeviceDetails/DeviceDetails.tsx b/src/app/devices/views/DeviceDetails/DeviceDetails.tsx
index 2051e1ad78..6f140e724d 100644
--- a/src/app/devices/views/DeviceDetails/DeviceDetails.tsx
+++ b/src/app/devices/views/DeviceDetails/DeviceDetails.tsx
@@ -1,8 +1,7 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Navigate, Route, Routes } from "react-router-dom";
import DeviceConfiguration from "./DeviceConfiguration";
import DeviceDetailsHeader from "./DeviceDetailsHeader";
@@ -133,7 +132,7 @@ const DeviceDetails = (): JSX.Element => {
path={getRelativeRoute(urls.devices.device.configuration(null), base)}
/>
}
+ element={}
path="/"
/>
diff --git a/src/app/devices/views/DeviceDetails/DeviceDetailsHeader/DeviceDetailsHeader.tsx b/src/app/devices/views/DeviceDetails/DeviceDetailsHeader/DeviceDetailsHeader.tsx
index 71e919e06d..c7b491d3ed 100644
--- a/src/app/devices/views/DeviceDetails/DeviceDetailsHeader/DeviceDetailsHeader.tsx
+++ b/src/app/devices/views/DeviceDetails/DeviceDetailsHeader/DeviceDetailsHeader.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { useSelector } from "react-redux";
import { useLocation } from "react-router";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DeviceName from "./DeviceName";
diff --git a/src/app/devices/views/DeviceList/DeviceList.test.tsx b/src/app/devices/views/DeviceList/DeviceList.test.tsx
index eabbfc4ea5..e8ff9fdcc6 100644
--- a/src/app/devices/views/DeviceList/DeviceList.test.tsx
+++ b/src/app/devices/views/DeviceList/DeviceList.test.tsx
@@ -1,4 +1,4 @@
-import { useLocation } from "react-router";
+import { Routes, useLocation } from "react-router";
import { Route } from "react-router-dom";
import DeviceList from "./DeviceList";
@@ -36,7 +36,9 @@ describe("DeviceList", () => {
renderWithBrowserRouter(
<>
-
+
+ } path="*" />
+
>,
{ route: "/machines?q=test+search", state }
);
diff --git a/src/app/devices/views/DeviceList/DeviceList.tsx b/src/app/devices/views/DeviceList/DeviceList.tsx
index 3da2597b7f..f13782b5e2 100644
--- a/src/app/devices/views/DeviceList/DeviceList.tsx
+++ b/src/app/devices/views/DeviceList/DeviceList.tsx
@@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useLocation } from "react-router";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import DeviceListHeader from "./DeviceListHeader";
import DeviceListTable from "./DeviceListTable";
diff --git a/src/app/devices/views/DeviceList/DeviceListHeader/DeviceListHeader.test.tsx b/src/app/devices/views/DeviceList/DeviceListHeader/DeviceListHeader.test.tsx
index 61791ae79f..ce9f98118b 100644
--- a/src/app/devices/views/DeviceList/DeviceListHeader/DeviceListHeader.test.tsx
+++ b/src/app/devices/views/DeviceList/DeviceListHeader/DeviceListHeader.test.tsx
@@ -1,5 +1,3 @@
-import { MemoryRouter } from "react-router-dom";
-
import DeviceListHeader from "./DeviceListHeader";
import { DeviceSidePanelViews } from "@/app/devices/constants";
@@ -64,13 +62,11 @@ describe("DeviceListHeader", () => {
it("can open the add device form", async () => {
const setSidePanelContent = vi.fn();
renderWithBrowserRouter(
-
-
- ,
+ ,
{ state }
);
await userEvent.click(screen.getByRole("button", { name: "Add device" }));
diff --git a/src/app/devices/views/DeviceList/DeviceListTable/DeviceListTable.tsx b/src/app/devices/views/DeviceList/DeviceListTable/DeviceListTable.tsx
index 5e6694e134..e2322e74c4 100644
--- a/src/app/devices/views/DeviceList/DeviceListTable/DeviceListTable.tsx
+++ b/src/app/devices/views/DeviceList/DeviceListTable/DeviceListTable.tsx
@@ -1,5 +1,5 @@
import { MainTable } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import OwnerColumn from "./OwnerColumn";
diff --git a/src/app/domains/views/DomainDetails/DomainDetailsHeader/AddRecordForm/AddRecordForm.test.tsx b/src/app/domains/views/DomainDetails/DomainDetailsHeader/AddRecordForm/AddRecordForm.test.tsx
index 362b54667e..ce06d33086 100644
--- a/src/app/domains/views/DomainDetails/DomainDetailsHeader/AddRecordForm/AddRecordForm.test.tsx
+++ b/src/app/domains/views/DomainDetails/DomainDetailsHeader/AddRecordForm/AddRecordForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddRecordForm, { Labels as AddRecordFormLabels } from "./AddRecordForm";
@@ -51,9 +50,7 @@ describe("AddRecordForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainDetails/DomainDetailsHeader/DeleteDomainForm/DeleteDomainForm.test.tsx b/src/app/domains/views/DomainDetails/DomainDetailsHeader/DeleteDomainForm/DeleteDomainForm.test.tsx
index e4509fb232..39ec720505 100644
--- a/src/app/domains/views/DomainDetails/DomainDetailsHeader/DeleteDomainForm/DeleteDomainForm.test.tsx
+++ b/src/app/domains/views/DomainDetails/DomainDetailsHeader/DeleteDomainForm/DeleteDomainForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeleteDomainForm, {
@@ -49,9 +48,7 @@ describe("DeleteDomainForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainDetails/DomainSummary/DomainSummary.test.tsx b/src/app/domains/views/DomainDetails/DomainSummary/DomainSummary.test.tsx
index 6f4bf78e9d..0a6cb2e73d 100644
--- a/src/app/domains/views/DomainDetails/DomainSummary/DomainSummary.test.tsx
+++ b/src/app/domains/views/DomainDetails/DomainSummary/DomainSummary.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DomainSummary, { Labels as DomainSummaryLabels } from "./DomainSummary";
@@ -157,9 +156,7 @@ describe("DomainSummary", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainDetails/ResourceRecords/DeleteRecordForm/DeleteRecordForm.test.tsx b/src/app/domains/views/DomainDetails/ResourceRecords/DeleteRecordForm/DeleteRecordForm.test.tsx
index 50afc2cc3b..ecc71e350d 100644
--- a/src/app/domains/views/DomainDetails/ResourceRecords/DeleteRecordForm/DeleteRecordForm.test.tsx
+++ b/src/app/domains/views/DomainDetails/ResourceRecords/DeleteRecordForm/DeleteRecordForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeleteRecordForm, {
@@ -61,9 +60,7 @@ describe("DeleteRecordForm", () => {
render(
-
-
-
+
);
@@ -94,9 +91,7 @@ describe("DeleteRecordForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainDetails/ResourceRecords/EditRecordForm/EditRecordForm.test.tsx b/src/app/domains/views/DomainDetails/ResourceRecords/EditRecordForm/EditRecordForm.test.tsx
index 3e77d8a688..6e6cec947b 100644
--- a/src/app/domains/views/DomainDetails/ResourceRecords/EditRecordForm/EditRecordForm.test.tsx
+++ b/src/app/domains/views/DomainDetails/ResourceRecords/EditRecordForm/EditRecordForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import EditRecordForm, {
@@ -70,9 +69,7 @@ describe("EditRecordForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainDetails/ResourceRecords/ResourceRecords.tsx b/src/app/domains/views/DomainDetails/ResourceRecords/ResourceRecords.tsx
index b7150677b6..d0032e714b 100644
--- a/src/app/domains/views/DomainDetails/ResourceRecords/ResourceRecords.tsx
+++ b/src/app/domains/views/DomainDetails/ResourceRecords/ResourceRecords.tsx
@@ -10,7 +10,7 @@ import {
} from "@canonical/react-components";
import classNames from "classnames";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DeleteRecordForm from "./DeleteRecordForm";
import EditRecordForm from "./EditRecordForm";
diff --git a/src/app/domains/views/DomainsList/DomainListHeaderForm/DomainListHeaderForm.test.tsx b/src/app/domains/views/DomainsList/DomainListHeaderForm/DomainListHeaderForm.test.tsx
index 62ce4cf795..4b98eb01c8 100644
--- a/src/app/domains/views/DomainsList/DomainListHeaderForm/DomainListHeaderForm.test.tsx
+++ b/src/app/domains/views/DomainsList/DomainListHeaderForm/DomainListHeaderForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DomainListHeaderForm, {
@@ -39,9 +38,7 @@ describe("DomainListHeaderForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.test.tsx b/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.test.tsx
index 3cfd0c3ac8..a2ec5ff3f8 100644
--- a/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.test.tsx
+++ b/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { DomainListSidePanelViews } from "../constants";
@@ -101,9 +100,7 @@ describe("DomainsTable", () => {
-
-
-
+
);
diff --git a/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.tsx b/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.tsx
index 5a00e67239..d8c88be892 100644
--- a/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.tsx
+++ b/src/app/domains/views/DomainsList/DomainsTable/DomainsTable.tsx
@@ -1,6 +1,6 @@
import { MainTable, ContextualMenu } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { DomainListSidePanelViews } from "../constants";
diff --git a/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchImagesForm/FetchImagesForm.test.tsx b/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchImagesForm/FetchImagesForm.test.tsx
index b574700141..8d69177a4e 100644
--- a/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchImagesForm/FetchImagesForm.test.tsx
+++ b/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchImagesForm/FetchImagesForm.test.tsx
@@ -1,7 +1,6 @@
import * as reactComponentHooks from "@canonical/react-components/dist/hooks";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FetchImagesForm, {
@@ -37,9 +36,7 @@ describe("FetchImagesForm", () => {
render(
-
-
-
+
);
@@ -105,9 +102,7 @@ describe("FetchImagesForm", () => {
const Proxy = () => (
-
-
-
+
);
diff --git a/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchedImages/FetchedImages.test.tsx b/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchedImages/FetchedImages.test.tsx
index 51d8af48bd..db4c06e076 100644
--- a/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchedImages/FetchedImages.test.tsx
+++ b/src/app/images/views/ImageList/SyncedImages/ChangeSource/FetchedImages/FetchedImages.test.tsx
@@ -1,7 +1,6 @@
import * as reactComponentHooks from "@canonical/react-components/dist/hooks";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FetchedImages, { Labels as FetchedImagesLabels } from "./FetchedImages";
@@ -69,9 +68,7 @@ describe("FetchedImages", () => {
render(
-
-
-
+
);
@@ -117,9 +114,7 @@ describe("FetchedImages", () => {
const { rerender } = render(
-
-
-
+
);
@@ -133,9 +128,7 @@ describe("FetchedImages", () => {
rerender(
-
-
-
+
);
diff --git a/src/app/images/views/ImageList/SyncedImages/OtherImages/OtherImages.test.tsx b/src/app/images/views/ImageList/SyncedImages/OtherImages/OtherImages.test.tsx
index 24a75943de..8f39b22d12 100644
--- a/src/app/images/views/ImageList/SyncedImages/OtherImages/OtherImages.test.tsx
+++ b/src/app/images/views/ImageList/SyncedImages/OtherImages/OtherImages.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import OtherImages, { Labels as OtherImagesLabels } from "./OtherImages";
@@ -73,9 +72,7 @@ describe("OtherImages", () => {
render(
-
-
-
+
);
@@ -140,9 +137,7 @@ describe("OtherImages", () => {
render(
-
-
-
+
);
diff --git a/src/app/images/views/ImageList/SyncedImages/UbuntuCoreImages/UbuntuCoreImages.test.tsx b/src/app/images/views/ImageList/SyncedImages/UbuntuCoreImages/UbuntuCoreImages.test.tsx
index f012984927..82528f382e 100644
--- a/src/app/images/views/ImageList/SyncedImages/UbuntuCoreImages/UbuntuCoreImages.test.tsx
+++ b/src/app/images/views/ImageList/SyncedImages/UbuntuCoreImages/UbuntuCoreImages.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import UbuntuCoreImages, {
@@ -103,9 +102,7 @@ describe("UbuntuCoreImages", () => {
render(
-
-
-
+
);
@@ -170,9 +167,7 @@ describe("UbuntuCoreImages", () => {
render(
-
-
-
+
);
diff --git a/src/app/images/views/ImageList/SyncedImages/UbuntuImages/UbuntuImages.test.tsx b/src/app/images/views/ImageList/SyncedImages/UbuntuImages/UbuntuImages.test.tsx
index 1397bcf9fc..8fd6089ffe 100644
--- a/src/app/images/views/ImageList/SyncedImages/UbuntuImages/UbuntuImages.test.tsx
+++ b/src/app/images/views/ImageList/SyncedImages/UbuntuImages/UbuntuImages.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import UbuntuImages, { Labels as UbuntuImagesLabels } from "./UbuntuImages";
@@ -133,9 +132,7 @@ describe("UbuntuImages", () => {
render(
-
-
-
+
);
@@ -204,9 +201,7 @@ describe("UbuntuImages", () => {
render(
-
-
-
+
);
diff --git a/src/app/intro/components/IntroSection/IntroSection.test.tsx b/src/app/intro/components/IntroSection/IntroSection.test.tsx
index 29b7d21873..1ae233a881 100644
--- a/src/app/intro/components/IntroSection/IntroSection.test.tsx
+++ b/src/app/intro/components/IntroSection/IntroSection.test.tsx
@@ -1,6 +1,5 @@
import { createMemoryHistory } from "history";
-import { Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import IntroSection from "./IntroSection";
@@ -44,9 +43,7 @@ describe("IntroSection", () => {
});
renderWithMockStore(
-
- Intro content
-
+ Intro content
,
{ state }
);
diff --git a/src/app/intro/components/IntroSection/IntroSection.tsx b/src/app/intro/components/IntroSection/IntroSection.tsx
index 8821272275..cdcdaaac51 100644
--- a/src/app/intro/components/IntroSection/IntroSection.tsx
+++ b/src/app/intro/components/IntroSection/IntroSection.tsx
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
import { useEffect } from "react";
import { Notification, Spinner } from "@canonical/react-components";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import PageContent from "@/app/base/components/PageContent";
import type { Props as PageContentProps } from "@/app/base/components/PageContent/PageContent";
diff --git a/src/app/intro/views/ImagesIntro/ImagesIntro.test.tsx b/src/app/intro/views/ImagesIntro/ImagesIntro.test.tsx
index 20440ef2e6..fa82e85555 100644
--- a/src/app/intro/views/ImagesIntro/ImagesIntro.test.tsx
+++ b/src/app/intro/views/ImagesIntro/ImagesIntro.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ImagesIntro, { Labels as ImagesIntroLabels } from "./ImagesIntro";
@@ -43,9 +42,7 @@ describe("ImagesIntro", () => {
-
-
-
+
);
diff --git a/src/app/intro/views/ImagesIntro/ImagesIntro.tsx b/src/app/intro/views/ImagesIntro/ImagesIntro.tsx
index 55b291caf1..b8c47be8d9 100644
--- a/src/app/intro/views/ImagesIntro/ImagesIntro.tsx
+++ b/src/app/intro/views/ImagesIntro/ImagesIntro.tsx
@@ -2,7 +2,7 @@ import { useEffect } from "react";
import { Button, Icon, Tooltip } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate, Link } from "react-router-dom-v5-compat";
+import { useNavigate, Link } from "react-router-dom";
import urls from "@/app/base/urls";
import SyncedImages from "@/app/images/views/ImageList/SyncedImages";
diff --git a/src/app/intro/views/Intro.tsx b/src/app/intro/views/Intro.tsx
index c0ef8b52cb..d9413c96ad 100644
--- a/src/app/intro/views/Intro.tsx
+++ b/src/app/intro/views/Intro.tsx
@@ -2,12 +2,7 @@ import type { ReactNode } from "react";
import { useEffect } from "react";
import { useSelector } from "react-redux";
-import {
- Route,
- Routes,
- useLocation,
- useNavigate,
-} from "react-router-dom-v5-compat";
+import { Route, Routes, useLocation, useNavigate } from "react-router-dom";
import { useExitURL } from "../hooks";
diff --git a/src/app/intro/views/MaasIntro/MaasIntro.test.tsx b/src/app/intro/views/MaasIntro/MaasIntro.test.tsx
index 1413eba51e..130b0d6e5f 100644
--- a/src/app/intro/views/MaasIntro/MaasIntro.test.tsx
+++ b/src/app/intro/views/MaasIntro/MaasIntro.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as ConnectivityCardLabels } from "./ConnectivityCard/ConnectivityCard";
@@ -71,9 +70,7 @@ describe("MaasIntro", () => {
const store = mockStore(state);
renderWithMockStore(
-
-
-
+
,
{ store }
);
@@ -118,9 +115,7 @@ describe("MaasIntro", () => {
const store = mockStore(state);
renderWithMockStore(
-
-
-
+
,
{ store }
);
@@ -177,9 +172,7 @@ describe("MaasIntro", () => {
const store = mockStore(state);
renderWithMockStore(
-
-
-
+
,
{ store }
);
diff --git a/src/app/intro/views/MaasIntro/MaasIntro.tsx b/src/app/intro/views/MaasIntro/MaasIntro.tsx
index f2e60dfeda..3f57eb6815 100644
--- a/src/app/intro/views/MaasIntro/MaasIntro.tsx
+++ b/src/app/intro/views/MaasIntro/MaasIntro.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { Card, Icon } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import ConnectivityCard from "./ConnectivityCard";
diff --git a/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.test.tsx b/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.test.tsx
index 70c1e6137d..e6b4777df4 100644
--- a/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.test.tsx
+++ b/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MaasIntroSuccess, {
@@ -82,9 +81,7 @@ describe("MaasIntroSuccess", () => {
-
-
-
+
,
{ store }
);
diff --git a/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.tsx b/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.tsx
index 90a44225e0..96d0d67a00 100644
--- a/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.tsx
+++ b/src/app/intro/views/MaasIntroSuccess/MaasIntroSuccess.tsx
@@ -1,6 +1,6 @@
import { Button, List } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import urls from "@/app/base/urls";
import IntroCard from "@/app/intro/components/IntroCard";
diff --git a/src/app/intro/views/UserIntro/UserIntro.test.tsx b/src/app/intro/views/UserIntro/UserIntro.test.tsx
index c30d6a888d..9ce22da056 100644
--- a/src/app/intro/views/UserIntro/UserIntro.test.tsx
+++ b/src/app/intro/views/UserIntro/UserIntro.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import type { SpyInstance } from "vitest";
@@ -111,9 +110,7 @@ describe("UserIntro", () => {
-
-
-
+
,
{ store }
);
@@ -157,9 +154,7 @@ describe("UserIntro", () => {
-
-
-
+
,
{ store }
);
diff --git a/src/app/kvm/components/KVMConfigurationCard/KVMConfigurationCard.test.tsx b/src/app/kvm/components/KVMConfigurationCard/KVMConfigurationCard.test.tsx
index e492613201..d081e6c2d5 100644
--- a/src/app/kvm/components/KVMConfigurationCard/KVMConfigurationCard.test.tsx
+++ b/src/app/kvm/components/KVMConfigurationCard/KVMConfigurationCard.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import KVMConfigurationCard from "./KVMConfigurationCard";
@@ -43,9 +42,7 @@ it("can handle updating a lxd KVM", async () => {
-
-
-
+
);
@@ -98,9 +95,7 @@ it("can handle updating a virsh KVM", async () => {
-
-
-
+
);
@@ -157,9 +152,7 @@ it("enables the submit button if form values are different to pod values", async
-
-
-
+
);
@@ -189,9 +182,7 @@ it("enables the submit button if form values are different to pod values", async
-
-
-
+
);
diff --git a/src/app/kvm/components/KVMForms/AddLxd/SelectProjectForm/SelectProjectFormFields/SelectProjectFormFields.tsx b/src/app/kvm/components/KVMForms/AddLxd/SelectProjectForm/SelectProjectFormFields/SelectProjectFormFields.tsx
index 0f66979697..2c51ad75c0 100644
--- a/src/app/kvm/components/KVMForms/AddLxd/SelectProjectForm/SelectProjectFormFields/SelectProjectFormFields.tsx
+++ b/src/app/kvm/components/KVMForms/AddLxd/SelectProjectForm/SelectProjectFormFields/SelectProjectFormFields.tsx
@@ -9,7 +9,7 @@ import {
} from "@canonical/react-components";
import { useFormikContext } from "formik";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { NewPodValues } from "../../types";
diff --git a/src/app/kvm/components/KVMForms/DeleteForm/DeleteForm.tsx b/src/app/kvm/components/KVMForms/DeleteForm/DeleteForm.tsx
index c72ee942d6..edb2abd9ff 100644
--- a/src/app/kvm/components/KVMForms/DeleteForm/DeleteForm.tsx
+++ b/src/app/kvm/components/KVMForms/DeleteForm/DeleteForm.tsx
@@ -2,7 +2,7 @@ import { useCallback } from "react";
import { Col, Icon, NotificationSeverity } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import ActionForm from "@/app/base/components/ActionForm";
diff --git a/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.test.tsx b/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.test.tsx
index f2148e4024..547b44f05a 100644
--- a/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.test.tsx
+++ b/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import LXDHostToolbar from "./LXDHostToolbar";
@@ -45,14 +44,12 @@ describe("LXDHostToolbar", () => {
{ pathname: urls.kvm.lxd.single.vms({ id: 1 }), key: "testKey" },
]}
>
-
-
-
+
);
@@ -71,14 +68,12 @@ describe("LXDHostToolbar", () => {
{ pathname: urls.kvm.lxd.single.vms({ id: 1 }), key: "testKey" },
]}
>
-
-
-
+
);
@@ -101,15 +96,13 @@ describe("LXDHostToolbar", () => {
},
]}
>
-
-
-
+
);
@@ -130,14 +123,12 @@ describe("LXDHostToolbar", () => {
{ pathname: urls.kvm.lxd.single.vms({ id: 1 }), key: "testKey" },
]}
>
-
-
-
+
);
@@ -154,14 +145,12 @@ describe("LXDHostToolbar", () => {
{ pathname: urls.kvm.lxd.single.vms({ id: 1 }), key: "testKey" },
]}
>
-
-
-
+
);
@@ -177,14 +166,12 @@ describe("LXDHostToolbar", () => {
render(
-
-
-
+
);
@@ -217,14 +204,12 @@ describe("LXDHostToolbar", () => {
render(
-
-
-
+
);
@@ -242,9 +227,7 @@ describe("LXDHostToolbar", () => {
{ pathname: urls.kvm.lxd.single.vms({ id: 1 }), key: "testKey" },
]}
>
-
-
-
+
);
diff --git a/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.tsx b/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.tsx
index d48dbb70bc..ffb3290e99 100644
--- a/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.tsx
+++ b/src/app/kvm/components/LXDHostToolbar/LXDHostToolbar.tsx
@@ -1,7 +1,6 @@
import { Icon, Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import Switch from "@/app/base/components/Switch";
import { useFetchActions, useSendAnalytics } from "@/app/base/hooks";
diff --git a/src/app/kvm/components/LXDVMsTable/VMsTable/NameColumn/NameColumn.tsx b/src/app/kvm/components/LXDVMsTable/VMsTable/NameColumn/NameColumn.tsx
index 49390984db..184405b4c1 100644
--- a/src/app/kvm/components/LXDVMsTable/VMsTable/NameColumn/NameColumn.tsx
+++ b/src/app/kvm/components/LXDVMsTable/VMsTable/NameColumn/NameColumn.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import urls from "@/app/base/urls";
diff --git a/src/app/kvm/components/NameColumn/NameColumn.tsx b/src/app/kvm/components/NameColumn/NameColumn.tsx
index 8d5093a97f..af91f23068 100644
--- a/src/app/kvm/components/NameColumn/NameColumn.tsx
+++ b/src/app/kvm/components/NameColumn/NameColumn.tsx
@@ -1,4 +1,4 @@
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
diff --git a/src/app/kvm/components/SettingsBackLink/SettingsBackLink.test.tsx b/src/app/kvm/components/SettingsBackLink/SettingsBackLink.test.tsx
index b6d49a12dd..246fee8bed 100644
--- a/src/app/kvm/components/SettingsBackLink/SettingsBackLink.test.tsx
+++ b/src/app/kvm/components/SettingsBackLink/SettingsBackLink.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { createMemoryHistory } from "history";
-import { Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import SettingsBackLink from "./SettingsBackLink";
@@ -10,9 +9,7 @@ describe("SettingsBackLink", () => {
const history = createMemoryHistory();
render(
-
-
-
+
);
@@ -28,9 +25,7 @@ describe("SettingsBackLink", () => {
render(
-
-
-
+
);
diff --git a/src/app/kvm/components/SettingsBackLink/SettingsBackLink.tsx b/src/app/kvm/components/SettingsBackLink/SettingsBackLink.tsx
index 2c8b6a5c48..b047e2e27a 100644
--- a/src/app/kvm/components/SettingsBackLink/SettingsBackLink.tsx
+++ b/src/app/kvm/components/SettingsBackLink/SettingsBackLink.tsx
@@ -1,5 +1,4 @@
import { Icon } from "@canonical/react-components";
-import type { Location } from "history";
import { Link, useLocation } from "react-router-dom";
type LocationState = {
@@ -7,9 +6,9 @@ type LocationState = {
};
const SettingsBackLink = (): JSX.Element | null => {
- const location = useLocation();
+ const location = useLocation();
const state = location.state as LocationState;
- if (state === undefined || !state.from) {
+ if (!state?.from) {
return null;
}
diff --git a/src/app/kvm/hooks.test.tsx b/src/app/kvm/hooks.test.tsx
index 2fd82eb01a..9767ae20fb 100644
--- a/src/app/kvm/hooks.test.tsx
+++ b/src/app/kvm/hooks.test.tsx
@@ -3,7 +3,6 @@ import type { ReactNode } from "react";
import { renderHook } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import type { MockStoreEnhanced } from "redux-mock-store";
@@ -21,9 +20,7 @@ const generateWrapper =
({ children }: { children: ReactNode }) =>
(
-
- {children}
-
+ {children}
);
diff --git a/src/app/kvm/hooks.tsx b/src/app/kvm/hooks.tsx
index 06a295adc0..560feb05d4 100644
--- a/src/app/kvm/hooks.tsx
+++ b/src/app/kvm/hooks.tsx
@@ -1,7 +1,7 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { useLocation } from "react-router-dom-v5-compat";
+import { useLocation } from "react-router-dom";
import urls from "@/app/base/urls";
import { podActions } from "@/app/store/pod";
diff --git a/src/app/kvm/views/KVM.tsx b/src/app/kvm/views/KVM.tsx
index c5745c0345..f51ff352b8 100644
--- a/src/app/kvm/views/KVM.tsx
+++ b/src/app/kvm/views/KVM.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import KVMList from "./KVMList";
import LXDClusterDetails from "./LXDClusterDetails";
diff --git a/src/app/kvm/views/KVMList/KVMList.tsx b/src/app/kvm/views/KVMList/KVMList.tsx
index 11d486aada..d4632793f1 100644
--- a/src/app/kvm/views/KVMList/KVMList.tsx
+++ b/src/app/kvm/views/KVMList/KVMList.tsx
@@ -3,7 +3,7 @@ import { useEffect } from "react";
import { Col, Row, Spinner, Strip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useLocation, useNavigate } from "react-router-dom-v5-compat";
+import { useLocation, useNavigate } from "react-router-dom";
import KVMListHeader from "./KVMListHeader";
import LxdTable from "./LxdTable";
diff --git a/src/app/kvm/views/KVMList/KVMListHeader/KVMListHeader.test.tsx b/src/app/kvm/views/KVMList/KVMListHeader/KVMListHeader.test.tsx
index 094d1a60fc..b60ac106a9 100644
--- a/src/app/kvm/views/KVMList/KVMListHeader/KVMListHeader.test.tsx
+++ b/src/app/kvm/views/KVMList/KVMListHeader/KVMListHeader.test.tsx
@@ -2,7 +2,6 @@ import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import KVMListHeader from "./KVMListHeader";
@@ -36,9 +35,7 @@ describe("KVMListHeader", () => {
render(
-
-
-
+
);
@@ -51,9 +48,7 @@ describe("KVMListHeader", () => {
render(
-
-
-
+
);
@@ -68,12 +63,10 @@ describe("KVMListHeader", () => {
-
-
-
+
);
@@ -97,12 +90,10 @@ describe("KVMListHeader", () => {
-
-
-
+
);
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetails.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetails.tsx
index dc3701a038..d1e8fc948d 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetails.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetails.tsx
@@ -1,13 +1,13 @@
import { useCallback, useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
import {
+ Navigate,
Route,
Routes,
useLocation,
useNavigate,
-} from "react-router-dom-v5-compat";
+} from "react-router-dom";
import LXDClusterDetailsHeader from "./LXDClusterDetailsHeader";
import LXDClusterDetailsRedirect from "./LXDClusterDetailsRedirect";
@@ -163,7 +163,9 @@ const LXDClusterDetails = (): JSX.Element => {
path={getRelativeRoute(urls.kvm.lxd.cluster.host.edit(null), base)}
/>
}
+ element={
+
+ }
path={getRelativeRoute(urls.kvm.lxd.cluster.index(null), base)}
/>
{
},
]}
>
-
-
-
+
);
@@ -72,12 +69,10 @@ describe("LXDClusterDetailsHeader", () => {
},
]}
>
-
-
-
+
);
@@ -104,12 +99,10 @@ describe("LXDClusterDetailsHeader", () => {
},
]}
>
-
-
-
+
);
@@ -131,12 +124,10 @@ describe("LXDClusterDetailsHeader", () => {
},
]}
>
-
-
-
+
);
@@ -158,12 +149,10 @@ describe("LXDClusterDetailsHeader", () => {
},
]}
>
-
-
-
+
);
@@ -188,12 +177,10 @@ describe("LXDClusterDetailsHeader", () => {
},
]}
>
-
-
-
+
);
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsHeader/LXDClusterDetailsHeader.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsHeader/LXDClusterDetailsHeader.tsx
index 33b7603033..33f3f87116 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsHeader/LXDClusterDetailsHeader.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsHeader/LXDClusterDetailsHeader.tsx
@@ -3,8 +3,7 @@ import type { ReactNode } from "react";
import { Button, Icon, Spinner } from "@canonical/react-components";
import pluralize from "pluralize";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx
index 332849bfd8..0aa6473c6f 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { Router } from "react-router";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import LXDClusterDetailsRedirect, { Label } from "./LXDClusterDetailsRedirect";
@@ -62,14 +62,12 @@ it("redirects to the config form", async () => {
render(
-
-
- }
- path={urls.kvm.lxd.cluster.host.index(null)}
- />
-
-
+
+ }
+ path={urls.kvm.lxd.cluster.host.index(null)}
+ />
+
);
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.tsx
index c8f7f208ea..efba0b2f04 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
+import { Navigate } from "react-router-dom";
import ModelNotFound from "@/app/base/components/ModelNotFound";
import { useGetURLId } from "@/app/base/hooks/urls";
@@ -40,7 +40,10 @@ const LXDClusterDetailsRedirect = ({ clusterId }: Props): JSX.Element => {
);
}
return (
-
+
);
};
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterHostSettings/LXDClusterHostSettings.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterHostSettings/LXDClusterHostSettings.tsx
index f821caad8a..2495d9944f 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterHostSettings/LXDClusterHostSettings.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterHostSettings/LXDClusterHostSettings.tsx
@@ -2,7 +2,7 @@ import { useEffect } from "react";
import { Spinner, Strip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ModelNotFound from "@/app/base/components/ModelNotFound";
import { useGetURLId, useWindowTitle } from "@/app/base/hooks";
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterHostVMs/LXDClusterHostVMs.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterHostVMs/LXDClusterHostVMs.tsx
index 21750bca3a..1f67103098 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterHostVMs/LXDClusterHostVMs.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterHostVMs/LXDClusterHostVMs.tsx
@@ -2,7 +2,7 @@ import { useEffect } from "react";
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ModelNotFound from "@/app/base/components/ModelNotFound";
import { useGetURLId, useWindowTitle } from "@/app/base/hooks";
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHosts.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHosts.tsx
index e3b895dc3e..47f9b6e5ed 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHosts.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHosts.tsx
@@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
import { Strip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useLocation, useNavigate } from "react-router-dom-v5-compat";
+import { useLocation, useNavigate } from "react-router-dom";
import LXDClusterSummaryCard from "../LXDClusterSummaryCard";
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHostsTable/LXDClusterHostsTable.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHostsTable/LXDClusterHostsTable.tsx
index 4823c120ba..2d1c474b27 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHostsTable/LXDClusterHostsTable.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterHosts/LXDClusterHostsTable/LXDClusterHostsTable.tsx
@@ -9,8 +9,7 @@ import {
} from "@canonical/react-components";
import type { Location } from "history";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import TableHeader from "@/app/base/components/TableHeader";
import { useFetchActions, useTableSort } from "@/app/base/hooks";
@@ -177,7 +176,7 @@ const LXDClusterHostsTable = ({
searchFilter,
setSidePanelContent,
}: Props): JSX.Element => {
- const location = useLocation();
+ const location = useLocation();
const pools = useSelector(poolSelectors.all);
const podsLoaded = useSelector(podSelectors.loaded);
const poolsLoaded = useSelector(poolSelectors.loaded);
diff --git a/src/app/kvm/views/LXDClusterDetails/LXDClusterVMs/LXDClusterVMs.tsx b/src/app/kvm/views/LXDClusterDetails/LXDClusterVMs/LXDClusterVMs.tsx
index b0051fdf82..911eb58742 100644
--- a/src/app/kvm/views/LXDClusterDetails/LXDClusterVMs/LXDClusterVMs.tsx
+++ b/src/app/kvm/views/LXDClusterDetails/LXDClusterVMs/LXDClusterVMs.tsx
@@ -1,6 +1,6 @@
import { Strip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import LXDClusterSummaryCard from "../LXDClusterSummaryCard";
diff --git a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetails.tsx b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetails.tsx
index 4af9c6f8b7..7eef0ff44f 100644
--- a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetails.tsx
+++ b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetails.tsx
@@ -1,13 +1,13 @@
import { useCallback, useEffect, useState } from "react";
import { useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
import {
+ Navigate,
Route,
Routes,
useLocation,
useNavigate,
-} from "react-router-dom-v5-compat";
+} from "react-router-dom";
import LXDSingleDetailsHeader from "./LXDSingleDetailsHeader";
import LXDSingleResources from "./LXDSingleResources";
@@ -123,7 +123,7 @@ const LXDSingleDetails = (): JSX.Element => {
path={getRelativeRoute(urls.kvm.lxd.single.edit(null), base)}
/>
}
+ element={}
path="/"
/>
diff --git a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.test.tsx b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.test.tsx
index 7225fb96b2..3295e7b573 100644
--- a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.test.tsx
+++ b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import LXDSingleDetailsHeader from "./LXDSingleDetailsHeader";
@@ -45,9 +44,7 @@ describe("LXDSingleDetailsHeader", () => {
render(
-
-
-
+
);
@@ -65,9 +62,7 @@ describe("LXDSingleDetailsHeader", () => {
-
-
-
+
);
@@ -87,9 +82,7 @@ describe("LXDSingleDetailsHeader", () => {
-
-
-
+
);
@@ -108,9 +101,7 @@ describe("LXDSingleDetailsHeader", () => {
-
-
-
+
);
@@ -130,12 +121,10 @@ describe("LXDSingleDetailsHeader", () => {
-
-
-
+
);
diff --git a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.tsx b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.tsx
index e073b20a35..bb4636f9e7 100644
--- a/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.tsx
+++ b/src/app/kvm/views/LXDSingleDetails/LXDSingleDetailsHeader/LXDSingleDetailsHeader.tsx
@@ -2,8 +2,7 @@ import type { ReactNode } from "react";
import { Button, Icon, Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/kvm/views/LXDSingleDetails/LXDSingleSettings/LXDSingleSettings.test.tsx b/src/app/kvm/views/LXDSingleDetails/LXDSingleSettings/LXDSingleSettings.test.tsx
index de42df4c2c..671197cfa5 100644
--- a/src/app/kvm/views/LXDSingleDetails/LXDSingleSettings/LXDSingleSettings.test.tsx
+++ b/src/app/kvm/views/LXDSingleDetails/LXDSingleSettings/LXDSingleSettings.test.tsx
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import LXDSingleSettings from "./LXDSingleSettings";
@@ -35,11 +34,7 @@ describe("LXDSingleSettings", () => {
render(
-
-
-
-
-
+
);
@@ -64,9 +59,7 @@ describe("LXDSingleSettings", () => {
render(
-
-
-
+
);
diff --git a/src/app/kvm/views/VirshDetails/VirshDetails.tsx b/src/app/kvm/views/VirshDetails/VirshDetails.tsx
index 441de1b11b..e4e8b7302e 100644
--- a/src/app/kvm/views/VirshDetails/VirshDetails.tsx
+++ b/src/app/kvm/views/VirshDetails/VirshDetails.tsx
@@ -1,8 +1,7 @@
import { useEffect } from "react";
import { useSelector } from "react-redux";
-import { Redirect } from "react-router-dom";
-import { Route, Routes, useNavigate } from "react-router-dom-v5-compat";
+import { Navigate, Route, Routes, useNavigate } from "react-router-dom";
import VirshDetailsHeader from "./VirshDetailsHeader";
import VirshResources from "./VirshResources";
@@ -83,7 +82,9 @@ const VirshDetails = (): JSX.Element => {
path={getRelativeRoute(urls.kvm.virsh.details.edit(null), base)}
/>
}
+ element={
+
+ }
path="/"
/>
diff --git a/src/app/kvm/views/VirshDetails/VirshDetailsHeader/VirshDetailsHeader.tsx b/src/app/kvm/views/VirshDetails/VirshDetailsHeader/VirshDetailsHeader.tsx
index bc140045dc..082b4abae7 100644
--- a/src/app/kvm/views/VirshDetails/VirshDetailsHeader/VirshDetailsHeader.tsx
+++ b/src/app/kvm/views/VirshDetails/VirshDetailsHeader/VirshDetailsHeader.tsx
@@ -2,8 +2,7 @@ import type { ReactNode } from "react";
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import VirshDetailsActionMenu from "./VirshDetailsActionMenu";
diff --git a/src/app/kvm/views/VirshDetails/VirshSettings/VirshSettings.test.tsx b/src/app/kvm/views/VirshDetails/VirshSettings/VirshSettings.test.tsx
index 475506cac3..c3b8cca998 100644
--- a/src/app/kvm/views/VirshDetails/VirshSettings/VirshSettings.test.tsx
+++ b/src/app/kvm/views/VirshDetails/VirshSettings/VirshSettings.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VirshSettings from "./VirshSettings";
@@ -35,9 +34,7 @@ describe("VirshSettings", () => {
render(
-
-
-
+
);
@@ -62,9 +59,7 @@ describe("VirshSettings", () => {
render(
-
-
-
+
);
diff --git a/src/app/machines/components/MachineForms/AddMachine/AddMachineForm/AddMachineForm.test.tsx b/src/app/machines/components/MachineForms/AddMachine/AddMachineForm/AddMachineForm.test.tsx
index 52b0717574..fb9573c768 100644
--- a/src/app/machines/components/MachineForms/AddMachine/AddMachineForm/AddMachineForm.test.tsx
+++ b/src/app/machines/components/MachineForms/AddMachine/AddMachineForm/AddMachineForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddMachineForm from "./AddMachineForm";
@@ -90,9 +89,7 @@ it("fetches the necessary data on load if not already loaded", () => {
-
-
-
+
);
@@ -119,9 +116,7 @@ it("displays a spinner if data has not loaded", () => {
-
-
-
+
);
@@ -136,9 +131,7 @@ it("enables submit when a power type with no fields is chosen", async () => {
-
-
-
+
);
@@ -163,9 +156,7 @@ it("can handle saving a machine", async () => {
-
-
-
+
);
@@ -230,9 +221,7 @@ it("correctly trims power parameters before dispatching action", async () => {
-
-
-
+
);
@@ -289,9 +278,7 @@ it("correctly filters empty extra mac fields", async () => {
-
-
-
+
);
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.test.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.test.tsx
index 116b69b1d7..ff7064268b 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.test.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.test.tsx
@@ -2,7 +2,6 @@ import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import CloneResults, { CloneErrorCodes } from "./CloneResults";
@@ -33,13 +32,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -63,13 +60,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -103,13 +98,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -144,13 +137,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -195,13 +186,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -237,13 +226,11 @@ describe("CloneResults", () => {
-
-
-
+
);
@@ -279,14 +266,12 @@ describe("CloneResults", () => {
-
-
-
+
);
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.tsx
index d6bf6d922f..c6e14b1d72 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/CloneForm/CloneResults/CloneResults.tsx
@@ -11,8 +11,7 @@ import {
} from "@canonical/react-components";
import pluralize from "pluralize";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import type { APIError, SetSearchFilter } from "@/app/base/types";
import urls from "@/app/base/urls";
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.test.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.test.tsx
index 8009b96e7b..a9f223f049 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.test.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeployForm from "../DeployForm";
@@ -133,14 +132,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -157,14 +154,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -187,14 +182,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -219,14 +212,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -245,14 +236,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -281,14 +270,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -327,14 +314,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -364,14 +349,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -399,14 +382,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -425,14 +406,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -454,14 +433,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -492,14 +469,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -533,14 +508,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -576,14 +549,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -614,14 +585,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -637,14 +606,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
@@ -673,14 +640,12 @@ describe("DeployFormFields", () => {
-
-
-
+
);
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.tsx
index 0991b01be1..0d996f5d41 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/DeployForm/DeployFormFields/DeployFormFields.tsx
@@ -12,7 +12,7 @@ import {
import classNames from "classnames";
import { useFormikContext } from "formik";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { DeployFormValues } from "../DeployForm";
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/OverrideTestForm/OverrideTestForm.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/OverrideTestForm/OverrideTestForm.tsx
index 54a8f11cf1..8964e06dde 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/OverrideTestForm/OverrideTestForm.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/OverrideTestForm/OverrideTestForm.tsx
@@ -1,6 +1,6 @@
import { Col, Row } from "@canonical/react-components";
import { useDispatch } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import * as Yup from "yup";
import ActionForm from "@/app/base/components/ActionForm";
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagForm.test.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagForm.test.tsx
index ce225b46c6..b1c33ea804 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagForm.test.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagForm.test.tsx
@@ -1,7 +1,6 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TagForm, { Label } from "./TagForm";
@@ -69,15 +68,13 @@ it("dispatches action to fetch tags on load", async () => {
-
-
-
+
);
@@ -98,17 +95,15 @@ it("correctly dispatches actions to tag machines", async () => {
-
- machine.system_id),
- }}
- viewingDetails={false}
- />
-
+ machine.system_id),
+ }}
+ viewingDetails={false}
+ />
);
@@ -156,17 +151,15 @@ it("correctly dispatches actions to untag machines", async () => {
-
- machine.system_id),
- }}
- viewingDetails={false}
- />
-
+ machine.system_id),
+ }}
+ viewingDetails={false}
+ />
);
@@ -205,15 +198,13 @@ it("correctly dispatches actions to tag and untag a machine", async () => {
-
- item.system_id) }}
- viewingDetails={false}
- />
-
+ item.system_id) }}
+ viewingDetails={false}
+ />
);
@@ -265,15 +256,13 @@ it("shows saving label if not viewing from machine config page", () => {
-
-
-
+
);
@@ -293,15 +282,13 @@ it("does not show saving label if viewing from machine config page", () => {
-
-
-
+
);
@@ -317,16 +304,14 @@ it("shows a notification on success", async () => {
-
- item.system_id) }}
- viewingDetails={false}
- />
-
+ item.system_id) }}
+ viewingDetails={false}
+ />
);
@@ -384,16 +369,14 @@ it("updates the new tags after creating a tag", async () => {
-
- item.system_id) }}
- viewingDetails={false}
- />
-
+ item.system_id) }}
+ viewingDetails={false}
+ />
);
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.test.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.test.tsx
index 8f9fca225e..8384b83365 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.test.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.test.tsx
@@ -2,7 +2,6 @@ import * as reduxToolkit from "@reduxjs/toolkit";
import { Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TagFormChanges, { Label, RowType } from "./TagFormChanges";
@@ -68,11 +67,9 @@ it("displays manual tags", () => {
render(
-
-
-
-
-
+
+
+
);
@@ -96,11 +93,9 @@ it("displays automatic tags", () => {
render(
-
-
-
-
-
+
+
+
);
@@ -124,18 +119,12 @@ it("displays added tags, with a 'NEW' prefix for newly created tags", () => {
render(
-
-
-
-
-
+
+
+
);
@@ -157,14 +146,12 @@ it("discards added tags", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -187,16 +174,14 @@ it("displays a tag details modal when chips are clicked", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -211,11 +196,9 @@ it("can remove manual tags", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -238,14 +221,12 @@ it("displays removed tags", () => {
render(
-
-
-
-
-
+
+
+
);
@@ -269,14 +250,12 @@ it("discards removed tags", async () => {
render(
-
-
-
-
-
+
+
+
);
@@ -310,11 +289,9 @@ it("shows a message if no tags are assigned to the selected machines", () => {
render(
-
-
-
-
-
+
+
+
);
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.tsx
index 0a405d76d2..574fa4a9d2 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormChanges/TagFormChanges.tsx
@@ -10,7 +10,7 @@ import {
} from "@canonical/react-components";
import { useFormikContext } from "formik";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { ColumnWithLooseAccessor } from "react-table";
import TagChip from "../TagChip";
diff --git a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormFields/TagFormFields.test.tsx b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormFields/TagFormFields.test.tsx
index e604bc7953..1b051cc4ad 100644
--- a/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormFields/TagFormFields.test.tsx
+++ b/src/app/machines/components/MachineForms/MachineActionFormWrapper/TagForm/TagFormFields/TagFormFields.test.tsx
@@ -2,7 +2,6 @@ import * as reduxToolkit from "@reduxjs/toolkit";
import { Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Label as TagFormChangesLabel } from "../TagFormChanges/TagFormChanges";
@@ -151,24 +150,19 @@ it("updates the new tags after creating a tag", async () => {
const Form = ({ tags }: { tags: Tag[TagMeta.PK][] }) => (
-
-
- item.system_id),
- }}
- setNewTags={setNewTags}
- viewingDetails={false}
- />
-
-
+
+ item.system_id),
+ }}
+ setNewTags={setNewTags}
+ viewingDetails={false}
+ />
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineCommissioning/MachineCommissioning.test.tsx b/src/app/machines/views/MachineDetails/MachineCommissioning/MachineCommissioning.test.tsx
index cb203dc19c..989d831177 100644
--- a/src/app/machines/views/MachineDetails/MachineCommissioning/MachineCommissioning.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineCommissioning/MachineCommissioning.test.tsx
@@ -1,8 +1,7 @@
import * as reactComponentHooks from "@canonical/react-components/dist/hooks";
import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import MachineCommissioning from ".";
@@ -63,11 +62,9 @@ describe("MachineCommissioning", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
);
@@ -86,11 +83,9 @@ describe("MachineCommissioning", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
);
@@ -104,11 +99,9 @@ describe("MachineCommissioning", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
);
@@ -146,11 +139,9 @@ describe("MachineCommissioning", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx
index 1729ae74ca..cae1024013 100644
--- a/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineConfiguration/MachineForm/MachineForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MachineForm from "./MachineForm";
@@ -43,9 +42,7 @@ describe("MachineForm", () => {
render(
-
-
-
+
);
@@ -61,9 +58,7 @@ describe("MachineForm", () => {
render(
-
-
-
+
);
@@ -78,9 +73,7 @@ describe("MachineForm", () => {
render(
-
-
-
+
);
@@ -105,9 +98,7 @@ describe("MachineForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/PowerForm/PowerForm.test.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/PowerForm/PowerForm.test.tsx
index af1e410ea3..534a0f7999 100644
--- a/src/app/machines/views/MachineDetails/MachineConfiguration/PowerForm/PowerForm.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineConfiguration/PowerForm/PowerForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import PowerForm from "./PowerForm";
@@ -68,9 +67,7 @@ it("is not editable if machine does not have edit permission", () => {
render(
-
-
-
+
);
@@ -86,9 +83,7 @@ it("is editable if machine has edit permission", () => {
render(
-
-
-
+
);
@@ -103,9 +98,7 @@ it("renders read-only text fields until edit button is pressed", async () => {
render(
-
-
-
+
);
@@ -135,9 +128,7 @@ it("correctly dispatches an action to update a machine's power", async () => {
render(
-
-
-
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineConfiguration/TagForm/TagForm.test.tsx b/src/app/machines/views/MachineDetails/MachineConfiguration/TagForm/TagForm.test.tsx
index c94280607e..26bbcb2168 100644
--- a/src/app/machines/views/MachineDetails/MachineConfiguration/TagForm/TagForm.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineConfiguration/TagForm/TagForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TagForm from "./TagForm";
@@ -48,9 +47,7 @@ describe("TagForm", () => {
render(
-
-
-
+
);
@@ -66,9 +63,7 @@ describe("TagForm", () => {
render(
-
-
-
+
);
@@ -84,9 +79,7 @@ describe("TagForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineDetails.tsx b/src/app/machines/views/MachineDetails/MachineDetails.tsx
index 45a6acde59..ebb64cffcd 100644
--- a/src/app/machines/views/MachineDetails/MachineDetails.tsx
+++ b/src/app/machines/views/MachineDetails/MachineDetails.tsx
@@ -1,8 +1,7 @@
import { useEffect } from "react";
import { useDispatch } from "react-redux";
-import { Redirect, useLocation } from "react-router-dom";
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Navigate, useLocation, Route, Routes } from "react-router-dom";
import MachineCommissioning from "./MachineCommissioning";
import MachineConfiguration from "./MachineConfiguration";
@@ -97,7 +96,9 @@ const MachineDetails = (): JSX.Element => {
{machine && (
}
+ element={
+
+ }
index
/>
{
/>
+
}
path={getRelativeRoute(urls.machines.machine.events(null), base)}
/>
@@ -213,7 +217,9 @@ const MachineDetails = (): JSX.Element => {
)}
/>
}
+ element={
+
+ }
path={base}
/>
diff --git a/src/app/machines/views/MachineDetails/MachineHeader/MachineHeader.tsx b/src/app/machines/views/MachineDetails/MachineHeader/MachineHeader.tsx
index 2fc786a999..acac229755 100644
--- a/src/app/machines/views/MachineDetails/MachineHeader/MachineHeader.tsx
+++ b/src/app/machines/views/MachineDetails/MachineHeader/MachineHeader.tsx
@@ -1,8 +1,7 @@
import { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import MachineName from "./MachineName";
diff --git a/src/app/machines/views/MachineDetails/MachineInstances/MachineInstances.tsx b/src/app/machines/views/MachineDetails/MachineInstances/MachineInstances.tsx
index 245704edf3..a684e3de62 100644
--- a/src/app/machines/views/MachineDetails/MachineInstances/MachineInstances.tsx
+++ b/src/app/machines/views/MachineDetails/MachineInstances/MachineInstances.tsx
@@ -2,7 +2,7 @@ import { useEffect } from "react";
import { Spinner, Row, Col, MainTable } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import { useWindowTitle } from "@/app/base/hooks";
import { useGetURLId } from "@/app/base/hooks/urls";
diff --git a/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.test.tsx b/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.test.tsx
index 3db002c62f..63d5b7ee94 100644
--- a/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.test.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import { storageLayoutOptions } from "./ChangeStorageLayoutMenu/ChangeStorageLayoutMenu";
import MachineStorage from "./MachineStorage";
diff --git a/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.tsx b/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.tsx
index 123bcda1fe..d19db77687 100644
--- a/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.tsx
+++ b/src/app/machines/views/MachineDetails/MachineStorage/MachineStorage.tsx
@@ -1,7 +1,7 @@
import { ExternalLink } from "@canonical/maas-react-components";
import { Spinner, Strip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import ChangeStorageLayoutMenu from "./ChangeStorageLayoutMenu";
diff --git a/src/app/machines/views/MachineDetails/MachineSummary/MachineSummary.tsx b/src/app/machines/views/MachineDetails/MachineSummary/MachineSummary.tsx
index f60efd1d8e..bf23d01fbd 100644
--- a/src/app/machines/views/MachineDetails/MachineSummary/MachineSummary.tsx
+++ b/src/app/machines/views/MachineDetails/MachineSummary/MachineSummary.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import NumaCard from "./NumaCard";
import TestResults from "./TestResults";
diff --git a/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.test.tsx b/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.test.tsx
index b7bcad691a..3d216713e2 100644
--- a/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SummaryNotifications from "./SummaryNotifications";
@@ -45,9 +44,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -77,9 +74,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -96,9 +91,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -116,9 +109,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -138,9 +129,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -158,9 +147,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
@@ -184,9 +171,7 @@ describe("SummaryNotifications", () => {
-
-
-
+
);
diff --git a/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.tsx b/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.tsx
index 1369a3d647..258fe27b98 100644
--- a/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.tsx
+++ b/src/app/machines/views/MachineDetails/MachineSummary/SummaryNotifications/SummaryNotifications.tsx
@@ -1,5 +1,5 @@
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import {
useFetchActions,
diff --git a/src/app/machines/views/MachineDetails/MachineSummary/TestResults/TestResults.tsx b/src/app/machines/views/MachineDetails/MachineSummary/TestResults/TestResults.tsx
index 95b4243923..09d2be30a0 100644
--- a/src/app/machines/views/MachineDetails/MachineSummary/TestResults/TestResults.tsx
+++ b/src/app/machines/views/MachineDetails/MachineSummary/TestResults/TestResults.tsx
@@ -1,5 +1,5 @@
import { Button, Icon, ICONS, Tooltip } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { HardwareType } from "@/app/base/enum";
import { useSendAnalytics } from "@/app/base/hooks";
diff --git a/src/app/machines/views/MachineDetails/MachineTests/MachineTests.test.tsx b/src/app/machines/views/MachineDetails/MachineTests/MachineTests.test.tsx
index 49a38414a9..8bc43c768a 100644
--- a/src/app/machines/views/MachineDetails/MachineTests/MachineTests.test.tsx
+++ b/src/app/machines/views/MachineDetails/MachineTests/MachineTests.test.tsx
@@ -1,7 +1,6 @@
import * as reactComponentHooks from "@canonical/react-components/dist/hooks";
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import MachineTests from ".";
@@ -73,11 +72,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -124,11 +121,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -167,11 +162,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -206,11 +199,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -229,11 +220,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -254,11 +243,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
@@ -299,11 +286,9 @@ describe("MachineTests", () => {
-
-
- } path="/machine/:id" />
-
-
+
+ } path="/machine/:id" />
+
,
{ store }
diff --git a/src/app/machines/views/MachineList/MachineListControls/MachineListControls.tsx b/src/app/machines/views/MachineList/MachineListControls/MachineListControls.tsx
index ea2bfd00cc..b039b66089 100644
--- a/src/app/machines/views/MachineList/MachineListControls/MachineListControls.tsx
+++ b/src/app/machines/views/MachineList/MachineListControls/MachineListControls.tsx
@@ -4,7 +4,7 @@ import { MainToolbar } from "@canonical/maas-react-components";
import { Button, Col, Icon } from "@canonical/react-components";
import pluralize from "pluralize";
import { useDispatch } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DebounceSearchBox from "@/app/base/components/DebounceSearchBox";
import GroupSelect from "@/app/base/components/GroupSelect";
diff --git a/src/app/machines/views/MachineList/MachineListTable/FabricColumn/FabricColumn.tsx b/src/app/machines/views/MachineList/MachineListTable/FabricColumn/FabricColumn.tsx
index 8147f48255..06d00e3bac 100644
--- a/src/app/machines/views/MachineList/MachineListTable/FabricColumn/FabricColumn.tsx
+++ b/src/app/machines/views/MachineList/MachineListTable/FabricColumn/FabricColumn.tsx
@@ -1,7 +1,7 @@
import { memo } from "react";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import MachineTestStatus from "../MachineTestStatus";
diff --git a/src/app/machines/views/MachineList/MachineListTable/NameColumn/NameColumn.tsx b/src/app/machines/views/MachineList/MachineListTable/NameColumn/NameColumn.tsx
index a18343bac5..dfcb5398f8 100644
--- a/src/app/machines/views/MachineList/MachineListTable/NameColumn/NameColumn.tsx
+++ b/src/app/machines/views/MachineList/MachineListTable/NameColumn/NameColumn.tsx
@@ -3,7 +3,7 @@ import { memo } from "react";
import { Button, Tooltip } from "@canonical/react-components";
import classNames from "classnames";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import MachineCheckbox from "../MachineCheckbox";
diff --git a/src/app/machines/views/MachineList/MachineListTable/PoolColumn/PoolColumn.tsx b/src/app/machines/views/MachineList/MachineListTable/PoolColumn/PoolColumn.tsx
index 04c8a16bd4..de07c23cfa 100644
--- a/src/app/machines/views/MachineList/MachineListTable/PoolColumn/PoolColumn.tsx
+++ b/src/app/machines/views/MachineList/MachineListTable/PoolColumn/PoolColumn.tsx
@@ -2,7 +2,7 @@ import { memo, useEffect, useState } from "react";
import { Spinner } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import urls from "@/app/base/urls";
diff --git a/src/app/machines/views/MachineList/MachineListTable/StatusColumn/StatusColumn.tsx b/src/app/machines/views/MachineList/MachineListTable/StatusColumn/StatusColumn.tsx
index bb1e380a61..1e0f4f9e7a 100644
--- a/src/app/machines/views/MachineList/MachineListTable/StatusColumn/StatusColumn.tsx
+++ b/src/app/machines/views/MachineList/MachineListTable/StatusColumn/StatusColumn.tsx
@@ -2,7 +2,7 @@ import * as React from "react";
import { Spinner, Tooltip } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import TooltipButton from "@/app/base/components/TooltipButton";
diff --git a/src/app/machines/views/MachineList/MachineListTable/ZoneColumn/ZoneColumn.tsx b/src/app/machines/views/MachineList/MachineListTable/ZoneColumn/ZoneColumn.tsx
index 450c45644b..c334f5a8a7 100644
--- a/src/app/machines/views/MachineList/MachineListTable/ZoneColumn/ZoneColumn.tsx
+++ b/src/app/machines/views/MachineList/MachineListTable/ZoneColumn/ZoneColumn.tsx
@@ -2,7 +2,7 @@ import { memo, useEffect, useState } from "react";
import { Spinner, Tooltip } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import DoubleRow from "@/app/base/components/DoubleRow";
import urls from "@/app/base/urls";
diff --git a/src/app/machines/views/Machines.test.tsx b/src/app/machines/views/Machines.test.tsx
index cc6dca95d7..8a3efd6f4f 100644
--- a/src/app/machines/views/Machines.test.tsx
+++ b/src/app/machines/views/Machines.test.tsx
@@ -1,7 +1,6 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { MachineSidePanelViews } from "../constants";
@@ -252,9 +251,7 @@ describe("Machines", () => {
{ pathname: "/machines", search: "?q=test+search", key: "testKey" },
]}
>
-
-
-
+
);
diff --git a/src/app/machines/views/Machines.tsx b/src/app/machines/views/Machines.tsx
index 5ec83d8096..eb476067d5 100644
--- a/src/app/machines/views/Machines.tsx
+++ b/src/app/machines/views/Machines.tsx
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useState } from "react";
import { useSelector } from "react-redux";
-import { useLocation, useNavigate, useMatch } from "react-router-dom-v5-compat";
+import { useLocation, useNavigate, useMatch } from "react-router-dom";
import { useStorageState } from "react-storage-hooks";
import MachineForms from "../components/MachineForms";
diff --git a/src/app/networkDiscovery/views/DiscoveryAddForm/DiscoveryAddFormFields/DiscoveryAddFormFields.tsx b/src/app/networkDiscovery/views/DiscoveryAddForm/DiscoveryAddFormFields/DiscoveryAddFormFields.tsx
index 47bb170216..fb0e403302 100644
--- a/src/app/networkDiscovery/views/DiscoveryAddForm/DiscoveryAddFormFields/DiscoveryAddFormFields.tsx
+++ b/src/app/networkDiscovery/views/DiscoveryAddForm/DiscoveryAddFormFields/DiscoveryAddFormFields.tsx
@@ -1,7 +1,7 @@
import { Col, Row, Select } from "@canonical/react-components";
import { useFormikContext } from "formik";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import type { DiscoveryAddValues } from "../types";
import { DeviceType } from "../types";
diff --git a/src/app/networkDiscovery/views/NetworkDiscovery.tsx b/src/app/networkDiscovery/views/NetworkDiscovery.tsx
index 6ae547cefd..4d3d2731f8 100644
--- a/src/app/networkDiscovery/views/NetworkDiscovery.tsx
+++ b/src/app/networkDiscovery/views/NetworkDiscovery.tsx
@@ -1,6 +1,6 @@
import { Notification } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import NetworkForm from "../components/NetworkForm";
diff --git a/src/app/networkDiscovery/views/NetworkDiscoveryConfigurationForm/NetworkDiscoveryConfigurationSubnetForm/NetworkDiscoveryConfigurationSubnetForm.tsx b/src/app/networkDiscovery/views/NetworkDiscoveryConfigurationForm/NetworkDiscoveryConfigurationSubnetForm/NetworkDiscoveryConfigurationSubnetForm.tsx
index 809b1fe70b..c7456344f6 100644
--- a/src/app/networkDiscovery/views/NetworkDiscoveryConfigurationForm/NetworkDiscoveryConfigurationSubnetForm/NetworkDiscoveryConfigurationSubnetForm.tsx
+++ b/src/app/networkDiscovery/views/NetworkDiscoveryConfigurationForm/NetworkDiscoveryConfigurationSubnetForm/NetworkDiscoveryConfigurationSubnetForm.tsx
@@ -1,6 +1,6 @@
import { Spinner, Strip } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import FormikField from "@/app/base/components/FormikField";
import FormikForm from "@/app/base/components/FormikForm";
diff --git a/src/app/networkDiscovery/views/NetworkDiscoveryHeader/NetworkDiscoveryHeader.tsx b/src/app/networkDiscovery/views/NetworkDiscoveryHeader/NetworkDiscoveryHeader.tsx
index 071876998c..90f4245746 100644
--- a/src/app/networkDiscovery/views/NetworkDiscoveryHeader/NetworkDiscoveryHeader.tsx
+++ b/src/app/networkDiscovery/views/NetworkDiscoveryHeader/NetworkDiscoveryHeader.tsx
@@ -1,8 +1,7 @@
import { Button } from "@canonical/react-components";
import pluralize from "pluralize";
import { useSelector } from "react-redux";
-import { useLocation } from "react-router-dom";
-import { Link } from "react-router-dom-v5-compat";
+import { useLocation, Link } from "react-router-dom";
import { NetworkDiscoverySidePanelViews } from "../constants";
diff --git a/src/app/pools/components/PoolDeleteForm/PoolDeleteForm.tsx b/src/app/pools/components/PoolDeleteForm/PoolDeleteForm.tsx
index e5f40b50f5..cf065b22ad 100644
--- a/src/app/pools/components/PoolDeleteForm/PoolDeleteForm.tsx
+++ b/src/app/pools/components/PoolDeleteForm/PoolDeleteForm.tsx
@@ -1,6 +1,6 @@
import { useOnEscapePressed } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ModelActionForm from "@/app/base/components/ModelActionForm";
import { useAddMessage } from "@/app/base/hooks";
diff --git a/src/app/pools/components/PoolForm/PoolForm.test.tsx b/src/app/pools/components/PoolForm/PoolForm.test.tsx
index a513d21fa8..53d7700ec4 100644
--- a/src/app/pools/components/PoolForm/PoolForm.test.tsx
+++ b/src/app/pools/components/PoolForm/PoolForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { PoolForm, Labels as PoolFormLabels } from "./PoolForm";
@@ -47,9 +46,7 @@ describe("PoolForm", () => {
const { unmount } = render(
-
-
-
+
);
@@ -75,9 +72,7 @@ describe("PoolForm", () => {
render(
-
-
-
+
);
@@ -117,9 +112,7 @@ describe("PoolForm", () => {
-
-
-
+
);
@@ -161,9 +154,7 @@ describe("PoolForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/pools/views/PoolAdd/PoolAdd.test.tsx b/src/app/pools/views/PoolAdd/PoolAdd.test.tsx
index ebd1c1a128..50670f5d96 100644
--- a/src/app/pools/views/PoolAdd/PoolAdd.test.tsx
+++ b/src/app/pools/views/PoolAdd/PoolAdd.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import { PoolAdd, Label as PoolAddLabel } from "./PoolAdd";
@@ -19,9 +18,7 @@ describe("PoolAdd", () => {
-
-
-
+
,
{ state }
);
diff --git a/src/app/pools/views/PoolAdd/PoolAdd.tsx b/src/app/pools/views/PoolAdd/PoolAdd.tsx
index e3d891c075..27adb90e68 100644
--- a/src/app/pools/views/PoolAdd/PoolAdd.tsx
+++ b/src/app/pools/views/PoolAdd/PoolAdd.tsx
@@ -1,5 +1,5 @@
import { useOnEscapePressed } from "@canonical/react-components";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import urls from "@/app/base/urls";
import PoolForm from "@/app/pools/components/PoolForm";
diff --git a/src/app/pools/views/PoolDelete/PoolDelete.tsx b/src/app/pools/views/PoolDelete/PoolDelete.tsx
index 121970a0f0..c2bec75fe0 100644
--- a/src/app/pools/views/PoolDelete/PoolDelete.tsx
+++ b/src/app/pools/views/PoolDelete/PoolDelete.tsx
@@ -1,5 +1,5 @@
import { useOnEscapePressed } from "@canonical/react-components";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import { useGetURLId } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/app/pools/views/PoolEdit/PoolEdit.tsx b/src/app/pools/views/PoolEdit/PoolEdit.tsx
index ad4bfc229d..acb88e5e75 100644
--- a/src/app/pools/views/PoolEdit/PoolEdit.tsx
+++ b/src/app/pools/views/PoolEdit/PoolEdit.tsx
@@ -1,6 +1,6 @@
import { Spinner, useOnEscapePressed } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ModelNotFound from "@/app/base/components/ModelNotFound";
import { useGetURLId } from "@/app/base/hooks/urls";
diff --git a/src/app/pools/views/PoolList/PoolList.test.tsx b/src/app/pools/views/PoolList/PoolList.test.tsx
index 37684ba927..1918959b29 100644
--- a/src/app/pools/views/PoolList/PoolList.test.tsx
+++ b/src/app/pools/views/PoolList/PoolList.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import PoolList from "./PoolList";
@@ -28,9 +27,7 @@ describe("PoolList", () => {
state.resourcepool.loading = true;
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -42,9 +39,7 @@ describe("PoolList", () => {
state.resourcepool.items = [factory.resourcePool({ permissions: [] })];
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -60,9 +55,7 @@ describe("PoolList", () => {
];
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -85,9 +78,7 @@ describe("PoolList", () => {
];
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -113,9 +104,7 @@ describe("PoolList", () => {
];
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -138,9 +127,7 @@ describe("PoolList", () => {
];
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -154,9 +141,7 @@ describe("PoolList", () => {
state.resourcepool.items[0].machine_total_count = 0;
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -169,9 +154,7 @@ describe("PoolList", () => {
state.resourcepool.items[0].machine_ready_count = 1;
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -187,9 +170,7 @@ describe("PoolList", () => {
state.resourcepool.errors = "Pools are not for swimming.";
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/pools/views/PoolList/PoolList.tsx b/src/app/pools/views/PoolList/PoolList.tsx
index 2f822ba56b..5a7269f310 100644
--- a/src/app/pools/views/PoolList/PoolList.tsx
+++ b/src/app/pools/views/PoolList/PoolList.tsx
@@ -6,7 +6,7 @@ import {
Row,
} from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import TableActions from "@/app/base/components/TableActions";
import { useFetchActions, useWindowTitle } from "@/app/base/hooks";
diff --git a/src/app/pools/views/Pools.tsx b/src/app/pools/views/Pools.tsx
index 2095c44cc5..97ae94d804 100644
--- a/src/app/pools/views/Pools.tsx
+++ b/src/app/pools/views/Pools.tsx
@@ -2,7 +2,7 @@ import { MainToolbar } from "@canonical/maas-react-components";
import { Button } from "@canonical/react-components";
import pluralize from "pluralize";
import { useSelector } from "react-redux";
-import { Link, Route, Routes } from "react-router-dom-v5-compat";
+import { Link, Route, Routes } from "react-router-dom";
import PoolDelete from "./PoolDelete";
import PoolList from "./PoolList";
diff --git a/src/app/preferences/components/Routes/Routes.tsx b/src/app/preferences/components/Routes/Routes.tsx
index 305345a0c9..9a4356d99c 100644
--- a/src/app/preferences/components/Routes/Routes.tsx
+++ b/src/app/preferences/components/Routes/Routes.tsx
@@ -1,5 +1,5 @@
-import { Redirect } from "react-router";
-import { Route, Routes as ReactRouterRoutes } from "react-router-dom-v5-compat";
+import { Navigate } from "react-router";
+import { Route, Routes as ReactRouterRoutes } from "react-router-dom";
import DeleteSSHKey from "../../views/SSHKeys/DeleteSSHKey";
import DeleteSSLKey from "../../views/SSLKeys/DeleteSSLKey";
@@ -23,7 +23,10 @@ const Routes = (): JSX.Element => {
const base = urls.preferences.index;
return (
- } path="/" />
+ }
+ path="/"
+ />
{
{ pathname: "/account/prefs/api-keys/1", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -52,9 +49,7 @@ describe("APIKeyEdit", () => {
{ pathname: "/account/prefs/api-keys/1", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -68,14 +63,12 @@ describe("APIKeyEdit", () => {
{ pathname: "/account/prefs/api-keys/1/edit", key: "testKey" },
]}
>
-
-
- }
- path="/account/prefs/api-keys/:id/edit"
- />
-
-
+
+ }
+ path="/account/prefs/api-keys/:id/edit"
+ />
+
,
{ state }
);
diff --git a/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.test.tsx b/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.test.tsx
index 416603f728..730542f861 100644
--- a/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.test.tsx
+++ b/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { APIKeyForm, Label as APIKeyFormLabels } from "./APIKeyForm";
@@ -38,9 +37,7 @@ describe("APIKeyForm", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -52,9 +49,7 @@ describe("APIKeyForm", () => {
render(
-
-
-
+
);
@@ -89,9 +84,7 @@ describe("APIKeyForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.tsx b/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.tsx
index 8cfb223f76..ed011863ca 100644
--- a/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.tsx
+++ b/src/app/preferences/views/APIKeys/APIKeyForm/APIKeyForm.tsx
@@ -1,6 +1,6 @@
import { Col, Row, useOnEscapePressed } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import FormikField from "@/app/base/components/FormikField";
diff --git a/src/app/preferences/views/APIKeys/APIKeyList/APIKeyList.test.tsx b/src/app/preferences/views/APIKeys/APIKeyList/APIKeyList.test.tsx
index ce7ce051a1..b47db341ad 100644
--- a/src/app/preferences/views/APIKeys/APIKeyList/APIKeyList.test.tsx
+++ b/src/app/preferences/views/APIKeys/APIKeyList/APIKeyList.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import APIKeyList, { Label as APIKeyListLabels } from "./APIKeyList";
@@ -40,9 +39,7 @@ describe("APIKeyList", () => {
{ pathname: "/account/prefs/api-keys", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
diff --git a/src/app/preferences/views/Details/Details.test.tsx b/src/app/preferences/views/Details/Details.test.tsx
index a7e9c3eec1..f8a6e5b546 100644
--- a/src/app/preferences/views/Details/Details.test.tsx
+++ b/src/app/preferences/views/Details/Details.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Details, Label as DetailsLabels } from "./Details";
@@ -44,9 +43,7 @@ describe("Details", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -58,9 +55,7 @@ describe("Details", () => {
const { unmount } = render(
-
-
-
+
);
@@ -77,9 +72,7 @@ describe("Details", () => {
render(
-
-
-
+
);
@@ -119,9 +112,7 @@ describe("Details", () => {
render(
-
-
-
+
);
@@ -168,9 +159,7 @@ describe("Details", () => {
render(
-
-
-
+
);
@@ -182,9 +171,7 @@ describe("Details", () => {
state.status.externalAuthURL = "http://login.example.com";
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.test.tsx b/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.test.tsx
index 6cb4417ad0..9e76bf85ab 100644
--- a/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.test.tsx
+++ b/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.test.tsx
@@ -1,6 +1,6 @@
import { createMemoryHistory } from "history";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import { AddSSHKey, Label as AddSSHKeyLabels } from "./AddSSHKey";
@@ -25,9 +25,7 @@ describe("AddSSHKey", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -41,9 +39,7 @@ describe("AddSSHKey", () => {
const history = createMemoryHistory({ initialEntries: ["/"] });
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.tsx b/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.tsx
index b5b489b3e5..d7171668a8 100644
--- a/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.tsx
+++ b/src/app/preferences/views/SSHKeys/AddSSHKey/AddSSHKey.tsx
@@ -1,5 +1,5 @@
import { useOnEscapePressed } from "@canonical/react-components";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import SSHKeyForm from "@/app/base/components/SSHKeyForm";
import urls from "@/app/base/urls";
diff --git a/src/app/preferences/views/SSHKeys/DeleteSSHKey/DeleteSSHKey.tsx b/src/app/preferences/views/SSHKeys/DeleteSSHKey/DeleteSSHKey.tsx
index 3fc7f74f24..06aab8cd6e 100644
--- a/src/app/preferences/views/SSHKeys/DeleteSSHKey/DeleteSSHKey.tsx
+++ b/src/app/preferences/views/SSHKeys/DeleteSSHKey/DeleteSSHKey.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { useOnEscapePressed } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate, useSearchParams } from "react-router-dom-v5-compat";
+import { useNavigate, useSearchParams } from "react-router-dom";
import ModelActionForm from "@/app/base/components/ModelActionForm";
import { useAddMessage } from "@/app/base/hooks";
diff --git a/src/app/preferences/views/SSHKeys/SSHKeyList/SSHKeyList.test.tsx b/src/app/preferences/views/SSHKeys/SSHKeyList/SSHKeyList.test.tsx
index c18dca2a47..03531a91f1 100644
--- a/src/app/preferences/views/SSHKeys/SSHKeyList/SSHKeyList.test.tsx
+++ b/src/app/preferences/views/SSHKeys/SSHKeyList/SSHKeyList.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import SSHKeyList, { Label as SSHKeyListLabels } from "./SSHKeyList";
@@ -49,9 +48,7 @@ describe("SSHKeyList", () => {
{ pathname: "/account/prefs/ssh-keys", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
diff --git a/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.test.tsx b/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.test.tsx
index 9587907fe1..1685c0fd15 100644
--- a/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.test.tsx
+++ b/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import { AddSSLKey, Label as AddSSLKeyLabels } from "./AddSSLKey";
@@ -34,9 +34,7 @@ describe("AddSSLKey", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -48,9 +46,7 @@ describe("AddSSLKey", () => {
const { unmount } = render(
-
-
-
+
);
@@ -67,9 +63,7 @@ describe("AddSSLKey", () => {
const history = createMemoryHistory({ initialEntries: ["/"] });
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -81,9 +75,7 @@ describe("AddSSLKey", () => {
render(
-
-
-
+
);
@@ -118,9 +110,7 @@ describe("AddSSLKey", () => {
render(
-
-
-
+
);
diff --git a/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.tsx b/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.tsx
index dd304dd53e..b6319cd98c 100644
--- a/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.tsx
+++ b/src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.tsx
@@ -6,7 +6,7 @@ import {
} from "@canonical/react-components";
import type { TextareaProps } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import FormikField from "@/app/base/components/FormikField";
diff --git a/src/app/preferences/views/SSLKeys/DeleteSSLKey/DeleteSSLKey.tsx b/src/app/preferences/views/SSLKeys/DeleteSSLKey/DeleteSSLKey.tsx
index e904383951..7efe96cb21 100644
--- a/src/app/preferences/views/SSLKeys/DeleteSSLKey/DeleteSSLKey.tsx
+++ b/src/app/preferences/views/SSLKeys/DeleteSSLKey/DeleteSSLKey.tsx
@@ -1,6 +1,6 @@
import { useOnEscapePressed } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import ModelActionForm from "@/app/base/components/ModelActionForm";
import { useAddMessage, useGetURLId } from "@/app/base/hooks";
diff --git a/src/app/preferences/views/SSLKeys/SSLKeyList/SSLKeyList.test.tsx b/src/app/preferences/views/SSLKeys/SSLKeyList/SSLKeyList.test.tsx
index 15dadcec1b..0f36f0a1e4 100644
--- a/src/app/preferences/views/SSLKeys/SSLKeyList/SSLKeyList.test.tsx
+++ b/src/app/preferences/views/SSLKeys/SSLKeyList/SSLKeyList.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import SSLKeyList, { Label as SSLKeyListLabels } from "./SSLKeyList";
@@ -50,9 +49,7 @@ describe("SSLKeyList", () => {
{ pathname: "/account/prefs/ssl-keys", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -67,9 +64,7 @@ describe("SSLKeyList", () => {
{ pathname: "/account/prefs/ssl-keys", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -83,9 +78,7 @@ describe("SSLKeyList", () => {
{ pathname: "/account/prefs/ssl-keys", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/components/Routes/Routes.test.tsx b/src/app/settings/components/Routes/Routes.test.tsx
index 185a8ffba6..4a053600d3 100644
--- a/src/app/settings/components/Routes/Routes.test.tsx
+++ b/src/app/settings/components/Routes/Routes.test.tsx
@@ -3,7 +3,7 @@ import Routes from "./Routes";
import urls from "@/app/base/urls";
import type { RootState } from "@/app/store/root/types";
import * as factory from "@/testing/factories";
-import { renderWithBrowserRouter } from "@/testing/utils";
+import { renderWithBrowserRouter, waitFor } from "@/testing/utils";
let state: RootState;
@@ -154,13 +154,17 @@ describe("Routes", () => {
});
});
- it("redirects from base URL to configuration", () => {
+ it("redirects from base URL to general configuration", async () => {
renderWithBrowserRouter(, {
route: urls.settings.index,
state,
routePattern: `${urls.settings.index}/*`,
});
- expect(window.location.pathname).toBe(urls.settings.configuration.index);
+ await waitFor(() => {
+ expect(window.location.pathname).toBe(
+ urls.settings.configuration.general
+ );
+ });
});
it("redirects from configuration index to general", () => {
diff --git a/src/app/settings/components/Routes/Routes.tsx b/src/app/settings/components/Routes/Routes.tsx
index 19fa409e5a..4be582222e 100644
--- a/src/app/settings/components/Routes/Routes.tsx
+++ b/src/app/settings/components/Routes/Routes.tsx
@@ -1,5 +1,4 @@
-import { Redirect } from "react-router-dom";
-import { Route, Routes as ReactRouterRoutes } from "react-router-dom-v5-compat";
+import { Navigate, Route, Routes as ReactRouterRoutes } from "react-router-dom";
import PageContent from "@/app/base/components/PageContent";
import urls from "@/app/base/urls";
@@ -78,11 +77,11 @@ const Routes = (): JSX.Element => {
path={getRelativeRoute(urls.settings.configuration.deploy, base)}
/>
}
+ element={}
path="/"
/>
}
+ element={}
path={getRelativeRoute(urls.settings.configuration.index, base)}
/>
{
path={getRelativeRoute(urls.settings.security.ipmiSettings, base)}
/>
}
+ element={
+
+ }
path={getRelativeRoute(urls.settings.security.index, base)}
/>
{
path={getRelativeRoute(urls.settings.network.networkDiscovery, base)}
/>
}
+ element={}
path={getRelativeRoute(urls.settings.network.index, base)}
/>
{
render(
-
-
-
+
);
@@ -65,9 +62,7 @@ describe("Commissioning", () => {
render(
-
-
-
+
);
@@ -85,9 +80,7 @@ describe("Commissioning", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/CommissioningForm/CommissioningForm.test.tsx b/src/app/settings/views/Configuration/CommissioningForm/CommissioningForm.test.tsx
index 55f066d8d1..b0d4da302c 100644
--- a/src/app/settings/views/Configuration/CommissioningForm/CommissioningForm.test.tsx
+++ b/src/app/settings/views/Configuration/CommissioningForm/CommissioningForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import CommissioningForm from "./CommissioningForm";
@@ -65,9 +64,7 @@ describe("CommissioningForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/CommissioningFormFields/CommissioningFormFields.test.tsx b/src/app/settings/views/Configuration/CommissioningFormFields/CommissioningFormFields.test.tsx
index 1e4d03f10b..898c08b780 100644
--- a/src/app/settings/views/Configuration/CommissioningFormFields/CommissioningFormFields.test.tsx
+++ b/src/app/settings/views/Configuration/CommissioningFormFields/CommissioningFormFields.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import CommissioningForm from "../CommissioningForm";
@@ -79,9 +78,7 @@ describe("CommissioningFormFields", () => {
render(
-
-
-
+
);
@@ -99,9 +96,7 @@ describe("CommissioningFormFields", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/DeployForm/DeployForm.test.tsx b/src/app/settings/views/Configuration/DeployForm/DeployForm.test.tsx
index ab65bf80c4..ba3e3e805a 100644
--- a/src/app/settings/views/Configuration/DeployForm/DeployForm.test.tsx
+++ b/src/app/settings/views/Configuration/DeployForm/DeployForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeployForm from "./DeployForm";
@@ -62,9 +61,7 @@ describe("DeployFormFields", () => {
render(
-
-
-
+
);
@@ -100,9 +97,7 @@ describe("DeployFormFields", () => {
render(
-
-
-
+
);
@@ -117,9 +112,7 @@ describe("DeployFormFields", () => {
render(
-
-
-
+
);
@@ -157,9 +150,7 @@ describe("DeployFormFields", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/General/General.test.tsx b/src/app/settings/views/Configuration/General/General.test.tsx
index 48de9e974c..378ad874a5 100644
--- a/src/app/settings/views/Configuration/General/General.test.tsx
+++ b/src/app/settings/views/Configuration/General/General.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as FormLabels } from "../GeneralForm/GeneralForm";
@@ -45,9 +44,7 @@ describe("General", () => {
render(
-
-
-
+
);
@@ -62,9 +59,7 @@ describe("General", () => {
render(
-
-
-
+
);
@@ -81,9 +76,7 @@ describe("General", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/GeneralForm/GeneralForm.test.tsx b/src/app/settings/views/Configuration/GeneralForm/GeneralForm.test.tsx
index 82ff5329d7..5378853ea9 100644
--- a/src/app/settings/views/Configuration/GeneralForm/GeneralForm.test.tsx
+++ b/src/app/settings/views/Configuration/GeneralForm/GeneralForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import GeneralForm from "./GeneralForm";
@@ -36,9 +35,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -54,9 +51,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -72,9 +67,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -92,9 +85,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -112,9 +103,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -132,9 +121,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
@@ -154,9 +141,7 @@ describe("GeneralForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/KernelParameters/KernelParameters.test.tsx b/src/app/settings/views/Configuration/KernelParameters/KernelParameters.test.tsx
index 28b523ff7f..226d730f06 100644
--- a/src/app/settings/views/Configuration/KernelParameters/KernelParameters.test.tsx
+++ b/src/app/settings/views/Configuration/KernelParameters/KernelParameters.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as KPFormLabels } from "../KernelParametersForm/KernelParametersForm";
@@ -40,9 +39,7 @@ describe("KernelParameters", () => {
render(
-
-
-
+
);
@@ -60,9 +57,7 @@ describe("KernelParameters", () => {
render(
-
-
-
+
);
@@ -80,9 +75,7 @@ describe("KernelParameters", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Configuration/KernelParametersForm/KernelParametersForm.test.tsx b/src/app/settings/views/Configuration/KernelParametersForm/KernelParametersForm.test.tsx
index b03ec4a6c6..246edd3b87 100644
--- a/src/app/settings/views/Configuration/KernelParametersForm/KernelParametersForm.test.tsx
+++ b/src/app/settings/views/Configuration/KernelParametersForm/KernelParametersForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import KernelParametersForm, {
@@ -37,9 +36,7 @@ describe("KernelParametersForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Dhcp/DhcpAdd/DhcpAdd.test.tsx b/src/app/settings/views/Dhcp/DhcpAdd/DhcpAdd.test.tsx
index 7ee20b4730..e1a97bb177 100644
--- a/src/app/settings/views/Dhcp/DhcpAdd/DhcpAdd.test.tsx
+++ b/src/app/settings/views/Dhcp/DhcpAdd/DhcpAdd.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import { DhcpAdd } from "./DhcpAdd";
@@ -19,9 +18,7 @@ describe("DhcpAdd", () => {
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Dhcp/DhcpEdit/DhcpEdit.test.tsx b/src/app/settings/views/Dhcp/DhcpEdit/DhcpEdit.test.tsx
index ced1bdebb5..24c4978e9a 100644
--- a/src/app/settings/views/Dhcp/DhcpEdit/DhcpEdit.test.tsx
+++ b/src/app/settings/views/Dhcp/DhcpEdit/DhcpEdit.test.tsx
@@ -1,5 +1,4 @@
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import { DhcpEdit } from "./DhcpEdit";
@@ -34,9 +33,7 @@ describe("DhcpEdit", () => {
-
-
-
+
,
{ state }
);
@@ -50,9 +47,7 @@ describe("DhcpEdit", () => {
{ pathname: "/settings/dhcp/99999/edit", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -64,11 +59,9 @@ describe("DhcpEdit", () => {
-
-
- } path="/settings/dhcp/:id/edit" />
-
-
+
+ } path="/settings/dhcp/:id/edit" />
+
,
{ state }
);
diff --git a/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.test.tsx b/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.test.tsx
index 387335bb43..cdb9d89967 100644
--- a/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.test.tsx
+++ b/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.test.tsx
@@ -1,6 +1,6 @@
import { createMemoryHistory } from "history";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import { DhcpForm } from "./DhcpForm";
@@ -38,9 +38,7 @@ describe("DhcpForm", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -56,9 +54,7 @@ describe("DhcpForm", () => {
});
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -68,9 +64,7 @@ describe("DhcpForm", () => {
it("shows the snippet name in the title when editing", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.tsx b/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.tsx
index f2f95e602d..b7a018735c 100644
--- a/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.tsx
+++ b/src/app/settings/views/Dhcp/DhcpForm/DhcpForm.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import BaseDhcpForm from "@/app/base/components/DhcpForm";
import type { DHCPFormValues } from "@/app/base/components/DhcpForm/types";
diff --git a/src/app/settings/views/Dhcp/DhcpList/DhcpList.test.tsx b/src/app/settings/views/Dhcp/DhcpList/DhcpList.test.tsx
index 9a7d9de5d6..335d1a14a1 100644
--- a/src/app/settings/views/Dhcp/DhcpList/DhcpList.test.tsx
+++ b/src/app/settings/views/Dhcp/DhcpList/DhcpList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DhcpList from "./DhcpList";
@@ -70,9 +69,7 @@ describe("DhcpList", () => {
it("can show a delete confirmation", async () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -91,9 +88,7 @@ describe("DhcpList", () => {
render(
-
-
-
+
);
@@ -131,9 +126,7 @@ describe("DhcpList", () => {
render(
-
-
-
+
);
@@ -160,9 +153,7 @@ describe("DhcpList", () => {
it("can show snippet details", async () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -181,9 +172,7 @@ describe("DhcpList", () => {
it("can filter dhcp snippets", async () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.test.tsx b/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.test.tsx
index c804d62420..2ab3f8644c 100644
--- a/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.test.tsx
+++ b/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import DhcpTarget from "./DhcpTarget";
@@ -64,9 +63,7 @@ describe("DhcpTarget", () => {
state.subnet.loading = true;
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -76,9 +73,7 @@ describe("DhcpTarget", () => {
it("can display a subnet link", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -91,9 +86,7 @@ describe("DhcpTarget", () => {
it("can display a node link", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.tsx b/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.tsx
index 012375abc2..7b885102a6 100644
--- a/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.tsx
+++ b/src/app/settings/views/Dhcp/DhcpTarget/DhcpTarget.tsx
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import { Spinner } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import urls from "@/app/base/urls";
import { useDhcpTarget } from "@/app/settings/hooks";
diff --git a/src/app/settings/views/Images/ThirdPartyDrivers/ThirdPartyDrivers.test.tsx b/src/app/settings/views/Images/ThirdPartyDrivers/ThirdPartyDrivers.test.tsx
index 91585809e3..c992ae0cb8 100644
--- a/src/app/settings/views/Images/ThirdPartyDrivers/ThirdPartyDrivers.test.tsx
+++ b/src/app/settings/views/Images/ThirdPartyDrivers/ThirdPartyDrivers.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as TPDFormLabels } from "../ThirdPartyDriversForm/ThirdPartyDriversForm";
@@ -37,9 +36,7 @@ describe("ThirdPartyDrivers", () => {
render(
-
-
-
+
);
@@ -54,9 +51,7 @@ describe("ThirdPartyDrivers", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Images/ThirdPartyDriversForm/ThirdPartyDriversForm.test.tsx b/src/app/settings/views/Images/ThirdPartyDriversForm/ThirdPartyDriversForm.test.tsx
index 8528b55064..abb94a5c77 100644
--- a/src/app/settings/views/Images/ThirdPartyDriversForm/ThirdPartyDriversForm.test.tsx
+++ b/src/app/settings/views/Images/ThirdPartyDriversForm/ThirdPartyDriversForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ThirdPartyDriversForm, {
@@ -36,9 +35,7 @@ describe("ThirdPartyDriversForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Images/VMWare/VMWare.test.tsx b/src/app/settings/views/Images/VMWare/VMWare.test.tsx
index 4d8730b890..8b6e6ba1dd 100644
--- a/src/app/settings/views/Images/VMWare/VMWare.test.tsx
+++ b/src/app/settings/views/Images/VMWare/VMWare.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as VMWareFormLabels } from "../VMWareForm/VMWareForm";
@@ -37,9 +36,7 @@ describe("VMWare", () => {
render(
-
-
-
+
);
@@ -54,9 +51,7 @@ describe("VMWare", () => {
render(
-
-
-
+
);
@@ -73,9 +68,7 @@ describe("VMWare", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Images/VMWareForm/VMWareForm.test.tsx b/src/app/settings/views/Images/VMWareForm/VMWareForm.test.tsx
index d1f2ee7e2b..04bf786bbd 100644
--- a/src/app/settings/views/Images/VMWareForm/VMWareForm.test.tsx
+++ b/src/app/settings/views/Images/VMWareForm/VMWareForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VMWareForm, { Labels as VMWareFormLabels } from "./VMWareForm";
@@ -46,9 +45,7 @@ describe("VMWareForm", () => {
render(
-
-
-
+
);
@@ -63,9 +60,7 @@ describe("VMWareForm", () => {
render(
-
-
-
+
);
@@ -80,9 +75,7 @@ describe("VMWareForm", () => {
render(
-
-
-
+
);
@@ -97,9 +90,7 @@ describe("VMWareForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Images/Windows/Windows.test.tsx b/src/app/settings/views/Images/Windows/Windows.test.tsx
index 4c37b915c6..2370c66720 100644
--- a/src/app/settings/views/Images/Windows/Windows.test.tsx
+++ b/src/app/settings/views/Images/Windows/Windows.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as WindowsFormLabels } from "../WindowsForm/WindowsForm";
@@ -39,9 +38,7 @@ describe("Windows", () => {
render(
-
-
-
+
);
@@ -56,9 +53,7 @@ describe("Windows", () => {
render(
-
-
-
+
);
@@ -75,9 +70,7 @@ describe("Windows", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Images/WindowsForm/WindowsForm.test.tsx b/src/app/settings/views/Images/WindowsForm/WindowsForm.test.tsx
index 47bf21bb10..de3733a2e5 100644
--- a/src/app/settings/views/Images/WindowsForm/WindowsForm.test.tsx
+++ b/src/app/settings/views/Images/WindowsForm/WindowsForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import WindowsForm, { Labels as WindowsFormLabels } from "./WindowsForm";
@@ -36,9 +35,7 @@ describe("WindowsForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.test.tsx b/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.test.tsx
index a47cbaa548..def939c268 100644
--- a/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.test.tsx
+++ b/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import { Labels as LicenseKeyFormLabels } from "../LicenseKeyForm/LicenseKeyForm";
@@ -71,9 +70,7 @@ describe("LicenseKeyEdit", () => {
},
]}
>
-
-
-
+
);
@@ -89,9 +86,7 @@ describe("LicenseKeyEdit", () => {
{ pathname: "/settings/license-keys/foo/bar/edit", key: "testKey" },
]}
>
-
-
-
+
);
@@ -110,14 +105,12 @@ describe("LicenseKeyEdit", () => {
},
]}
>
-
-
- }
- path="/settings/license-keys/:osystem/:distro_series/edit"
- />
-
-
+
+ }
+ path="/settings/license-keys/:osystem/:distro_series/edit"
+ />
+
);
diff --git a/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.tsx b/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.tsx
index e64fb05220..d0fd37a087 100644
--- a/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.tsx
+++ b/src/app/settings/views/LicenseKeys/LicenseKeyEdit/LicenseKeyEdit.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useParams } from "react-router-dom-v5-compat";
+import { useParams } from "react-router-dom";
import LicenseKeyForm from "../LicenseKeyForm";
diff --git a/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.test.tsx b/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.test.tsx
index 95ef199f15..b7cb2a7edf 100644
--- a/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.test.tsx
+++ b/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import { Labels as FormFieldsLabels } from "../LicenseKeyFormFields/LicenseKeyFormFields";
@@ -49,9 +49,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -67,9 +65,7 @@ describe("LicenseKeyForm", () => {
const { unmount } = render(
-
-
-
+
);
@@ -87,9 +83,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -105,9 +99,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -126,9 +118,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -140,9 +130,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -190,9 +178,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
@@ -232,9 +218,7 @@ describe("LicenseKeyForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.tsx b/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.tsx
index 478998d784..edd9004f7d 100644
--- a/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.tsx
+++ b/src/app/settings/views/LicenseKeys/LicenseKeyForm/LicenseKeyForm.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { Spinner } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import LicenseKeyFormFields from "../LicenseKeyFormFields";
diff --git a/src/app/settings/views/LicenseKeys/LicenseKeyList/LicenseKeyList.test.tsx b/src/app/settings/views/LicenseKeys/LicenseKeyList/LicenseKeyList.test.tsx
index 0ca7bc2ec1..da3904da75 100644
--- a/src/app/settings/views/LicenseKeys/LicenseKeyList/LicenseKeyList.test.tsx
+++ b/src/app/settings/views/LicenseKeys/LicenseKeyList/LicenseKeyList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import LicenseKeyList from ".";
@@ -45,9 +44,7 @@ describe("LicenseKeyList", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Network/DnsForm/DnsForm.test.tsx b/src/app/settings/views/Network/DnsForm/DnsForm.test.tsx
index d1acf6cd25..4569896622 100644
--- a/src/app/settings/views/Network/DnsForm/DnsForm.test.tsx
+++ b/src/app/settings/views/Network/DnsForm/DnsForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DnsForm from "./DnsForm";
@@ -46,9 +45,7 @@ describe("DnsForm", () => {
render(
-
-
-
+
);
@@ -61,9 +58,7 @@ describe("DnsForm", () => {
render(
-
-
-
+
);
@@ -102,9 +97,7 @@ describe("DnsForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Network/NetworkDiscoveryForm/NetworkDiscoveryForm.test.tsx b/src/app/settings/views/Network/NetworkDiscoveryForm/NetworkDiscoveryForm.test.tsx
index a07e052717..d9193a9f14 100644
--- a/src/app/settings/views/Network/NetworkDiscoveryForm/NetworkDiscoveryForm.test.tsx
+++ b/src/app/settings/views/Network/NetworkDiscoveryForm/NetworkDiscoveryForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import NetworkDiscoveryForm from "./NetworkDiscoveryForm";
@@ -55,9 +54,7 @@ describe("NetworkDiscoveryForm", () => {
render(
-
-
-
+
);
@@ -70,9 +67,7 @@ describe("NetworkDiscoveryForm", () => {
render(
-
-
-
+
);
@@ -110,9 +105,7 @@ describe("NetworkDiscoveryForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Network/NtpForm/NtpForm.test.tsx b/src/app/settings/views/Network/NtpForm/NtpForm.test.tsx
index b8c4920c96..10f98eff56 100644
--- a/src/app/settings/views/Network/NtpForm/NtpForm.test.tsx
+++ b/src/app/settings/views/Network/NtpForm/NtpForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import NtpForm from "./NtpForm";
@@ -37,9 +36,7 @@ describe("NtpForm", () => {
render(
-
-
-
+
);
@@ -52,9 +49,7 @@ describe("NtpForm", () => {
render(
-
-
-
+
);
@@ -92,9 +87,7 @@ describe("NtpForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Network/ProxyForm/ProxyForm.test.tsx b/src/app/settings/views/Network/ProxyForm/ProxyForm.test.tsx
index fb5a33d34c..3b05dc1ee6 100644
--- a/src/app/settings/views/Network/ProxyForm/ProxyForm.test.tsx
+++ b/src/app/settings/views/Network/ProxyForm/ProxyForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ProxyForm from "./ProxyForm";
@@ -44,9 +43,7 @@ describe("ProxyForm", () => {
render(
-
-
-
+
);
@@ -67,9 +64,7 @@ describe("ProxyForm", () => {
-
-
-
+
);
@@ -83,9 +78,7 @@ describe("ProxyForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Network/ProxyFormFields/ProxyFormFields.test.tsx b/src/app/settings/views/Network/ProxyFormFields/ProxyFormFields.test.tsx
index 343cc27c27..cb6f0714d6 100644
--- a/src/app/settings/views/Network/ProxyFormFields/ProxyFormFields.test.tsx
+++ b/src/app/settings/views/Network/ProxyFormFields/ProxyFormFields.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ProxyForm from "../ProxyForm";
@@ -44,9 +43,7 @@ describe("ProxyFormFields", () => {
-
-
-
+
);
diff --git a/src/app/settings/views/Network/SyslogForm/SyslogForm.test.tsx b/src/app/settings/views/Network/SyslogForm/SyslogForm.test.tsx
index e304505424..439393c70b 100644
--- a/src/app/settings/views/Network/SyslogForm/SyslogForm.test.tsx
+++ b/src/app/settings/views/Network/SyslogForm/SyslogForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SyslogForm from "./SyslogForm";
@@ -36,9 +35,7 @@ describe("SyslogForm", () => {
render(
-
-
-
+
);
@@ -51,9 +48,7 @@ describe("SyslogForm", () => {
render(
-
-
-
+
);
@@ -88,9 +83,7 @@ describe("SyslogForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Repositories/RepositoriesList/RepositoriesList.test.tsx b/src/app/settings/views/Repositories/RepositoriesList/RepositoriesList.test.tsx
index b8a825cfc5..7c392642c8 100644
--- a/src/app/settings/views/Repositories/RepositoriesList/RepositoriesList.test.tsx
+++ b/src/app/settings/views/Repositories/RepositoriesList/RepositoriesList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import RepositoriesList, {
@@ -69,9 +68,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -86,9 +83,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -102,9 +97,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -141,9 +134,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
);
@@ -193,9 +184,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -220,9 +209,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
,
{ state }
);
@@ -245,9 +232,7 @@ describe("RepositoriesList", () => {
{ pathname: "/settings/repositories", key: "testKey" },
]}
>
-
-
-
+
);
diff --git a/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.test.tsx b/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.test.tsx
index fe933657a3..f82ab36888 100644
--- a/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.test.tsx
+++ b/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.test.tsx
@@ -1,5 +1,4 @@
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import RepositoryAdd from "./RepositoryAdd";
@@ -37,14 +36,12 @@ describe("RepositoryAdd", () => {
{ pathname: "/settings/repositories/add/ppa", key: "testKey" },
]}
>
-
-
- }
- path="/settings/repositories/add/:type"
- />
-
-
+
+ }
+ path="/settings/repositories/add/:type"
+ />
+
,
{ state }
);
@@ -62,14 +59,12 @@ describe("RepositoryAdd", () => {
},
]}
>
-
-
- }
- path="/settings/repositories/add/:type"
- />
-
-
+
+ }
+ path="/settings/repositories/add/:type"
+ />
+
,
{ state }
);
diff --git a/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.tsx b/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.tsx
index 42e1e66ec6..c13cfb8bde 100644
--- a/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.tsx
+++ b/src/app/settings/views/Repositories/RepositoryAdd/RepositoryAdd.tsx
@@ -1,4 +1,4 @@
-import { useParams } from "react-router-dom-v5-compat";
+import { useParams } from "react-router-dom";
import RepositoryForm from "../RepositoryForm";
diff --git a/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.test.tsx b/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.test.tsx
index a054045eab..ad1e976713 100644
--- a/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.test.tsx
+++ b/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.test.tsx
@@ -1,5 +1,4 @@
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import { Labels as RepositoryFormLabels } from "../RepositoryFormFields/RepositoryFormFields";
@@ -48,14 +47,12 @@ describe("RepositoryEdit", () => {
},
]}
>
-
-
- }
- path="/settings/repositories/edit/:type/:id"
- />
-
-
+
+ }
+ path="/settings/repositories/edit/:type/:id"
+ />
+
,
{ state }
);
@@ -72,14 +69,12 @@ describe("RepositoryEdit", () => {
},
]}
>
-
-
- }
- path="/settings/repositories/edit/:type/:id"
- />
-
-
+
+ }
+ path="/settings/repositories/edit/:type/:id"
+ />
+
,
{ state }
);
@@ -96,14 +91,12 @@ describe("RepositoryEdit", () => {
},
]}
>
-
-
- }
- path="/settings/repositories/edit/:type/:id"
- />
-
-
+
+ }
+ path="/settings/repositories/edit/:type/:id"
+ />
+
,
{ state }
);
diff --git a/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.tsx b/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.tsx
index 51c9c3094f..aaa1803ecd 100644
--- a/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.tsx
+++ b/src/app/settings/views/Repositories/RepositoryEdit/RepositoryEdit.tsx
@@ -1,6 +1,6 @@
import { Spinner } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { useParams } from "react-router-dom-v5-compat";
+import { useParams } from "react-router-dom";
import RepositoryForm from "../RepositoryForm";
diff --git a/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.test.tsx b/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.test.tsx
index 33618e6608..7b330e44ac 100644
--- a/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.test.tsx
+++ b/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import { Labels as RepositoryFormLabels } from "../RepositoryFormFields/RepositoryFormFields";
@@ -53,9 +53,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -106,9 +104,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -121,9 +117,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -134,12 +128,10 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -152,12 +144,10 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -171,9 +161,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -194,9 +182,7 @@ describe("RepositoryForm", () => {
});
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -226,9 +212,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -294,9 +278,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
@@ -346,9 +328,7 @@ describe("RepositoryForm", () => {
-
-
-
+
);
diff --git a/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.tsx b/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.tsx
index b71c333d03..184f49157b 100644
--- a/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.tsx
+++ b/src/app/settings/views/Repositories/RepositoryForm/RepositoryForm.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { Spinner } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import RepositoryFormFields from "../RepositoryFormFields";
diff --git a/src/app/settings/views/Repositories/RepositoryFormFields/RepositoryFormFields.test.tsx b/src/app/settings/views/Repositories/RepositoryFormFields/RepositoryFormFields.test.tsx
index 90f82290d3..b9c67999a7 100644
--- a/src/app/settings/views/Repositories/RepositoryFormFields/RepositoryFormFields.test.tsx
+++ b/src/app/settings/views/Repositories/RepositoryFormFields/RepositoryFormFields.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import RepositoryForm from "../RepositoryForm";
import { Labels as RepositoryFormLabels } from "../RepositoryFormFields/RepositoryFormFields";
@@ -38,12 +37,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -64,12 +61,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -93,12 +88,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -117,12 +110,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -149,12 +140,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -178,12 +167,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -204,12 +191,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -226,12 +211,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -248,12 +231,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -270,12 +251,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -294,12 +273,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -319,12 +296,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -351,12 +326,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
@@ -386,12 +359,10 @@ describe("RepositoryFormFields", () => {
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Scripts/ScriptsList/ScriptsList.test.tsx b/src/app/settings/views/Scripts/ScriptsList/ScriptsList.test.tsx
index 85900e3160..cfab712df3 100644
--- a/src/app/settings/views/Scripts/ScriptsList/ScriptsList.test.tsx
+++ b/src/app/settings/views/Scripts/ScriptsList/ScriptsList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels as ScriptsListLabels } from "./ScriptsList";
@@ -67,9 +66,7 @@ describe("ScriptsList", () => {
render(
-
-
-
+
);
@@ -86,9 +83,7 @@ describe("ScriptsList", () => {
render(
-
-
-
+
);
@@ -101,9 +96,7 @@ describe("ScriptsList", () => {
it("Displays commissioning scripts by default", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -125,9 +118,7 @@ describe("ScriptsList", () => {
it("Displays testing scripts", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -160,9 +151,7 @@ describe("ScriptsList", () => {
it("can show a delete confirmation", async () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -199,9 +188,7 @@ describe("ScriptsList", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -230,9 +217,7 @@ describe("ScriptsList", () => {
render(
-
-
-
+
);
@@ -275,9 +260,7 @@ describe("ScriptsList", () => {
render(
-
-
-
+
);
@@ -293,9 +276,7 @@ describe("ScriptsList", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -328,9 +309,7 @@ describe("ScriptsList", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -356,9 +335,7 @@ describe("ScriptsList", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.test.tsx b/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.test.tsx
index 99ea089c88..6a61dff1a0 100644
--- a/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.test.tsx
+++ b/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.test.tsx
@@ -1,9 +1,9 @@
import { createMemoryHistory } from "history";
import type { FileWithPath } from "react-dropzone";
import { Provider } from "react-redux";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
import type { Dispatch } from "redux";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import ScriptsUpload, { Labels as ScriptsUploadLabels } from "./ScriptsUpload";
@@ -63,9 +63,7 @@ describe("ScriptsUpload", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -87,9 +85,7 @@ describe("ScriptsUpload", () => {
render(
-
-
-
+
);
@@ -112,9 +108,7 @@ describe("ScriptsUpload", () => {
render(
-
-
-
+
);
@@ -151,9 +145,7 @@ describe("ScriptsUpload", () => {
render(
-
-
-
+
);
@@ -195,9 +187,7 @@ describe("ScriptsUpload", () => {
render(
-
-
-
+
);
@@ -224,9 +214,7 @@ describe("ScriptsUpload", () => {
});
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -240,9 +228,7 @@ describe("ScriptsUpload", () => {
});
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.tsx b/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.tsx
index 6c4e276e2c..00e2d38328 100644
--- a/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.tsx
+++ b/src/app/settings/views/Scripts/ScriptsUpload/ScriptsUpload.tsx
@@ -5,7 +5,7 @@ import classNames from "classnames";
import type { FileRejection, FileWithPath } from "react-dropzone";
import { useDropzone } from "react-dropzone";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import type { ReadScriptResponse } from "./readScript";
import readScript from "./readScript";
diff --git a/src/app/settings/views/Security/SecurityProtocols/TLSEnabled/TLSEnabled.test.tsx b/src/app/settings/views/Security/SecurityProtocols/TLSEnabled/TLSEnabled.test.tsx
index 2978b1d097..54b96ad230 100644
--- a/src/app/settings/views/Security/SecurityProtocols/TLSEnabled/TLSEnabled.test.tsx
+++ b/src/app/settings/views/Security/SecurityProtocols/TLSEnabled/TLSEnabled.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TLSEnabled, { Labels } from "./TLSEnabled";
@@ -22,9 +21,7 @@ it("displays a spinner while loading config", () => {
render(
-
-
-
+
);
@@ -44,9 +41,7 @@ it("displays a spinner while loading the certificate", () => {
render(
-
-
-
+
);
@@ -68,9 +63,7 @@ it("renders certificate content", () => {
render(
-
-
-
+
);
@@ -106,9 +99,7 @@ it("disables the interval field if notification is not enabled", async () => {
render(
-
-
-
+
);
@@ -150,9 +141,7 @@ it("shows an error if TLS notification is enabled but interval is invalid", asyn
render(
-
-
-
+
);
@@ -196,9 +185,7 @@ it("dispatches an action to update TLS notification config with notification ena
render(
-
-
-
+
);
@@ -249,9 +236,7 @@ it("dispatches an action to update TLS notification config with notification dis
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Storage/StorageForm/StorageForm.test.tsx b/src/app/settings/views/Storage/StorageForm/StorageForm.test.tsx
index c0c78e772b..ec73a383e1 100644
--- a/src/app/settings/views/Storage/StorageForm/StorageForm.test.tsx
+++ b/src/app/settings/views/Storage/StorageForm/StorageForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import StorageForm from "./StorageForm";
@@ -53,9 +52,7 @@ describe("StorageForm", () => {
render(
-
-
-
+
);
@@ -97,9 +94,7 @@ describe("StorageForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Storage/StorageForm/StorageFormFields/StorageFormFields.test.tsx b/src/app/settings/views/Storage/StorageForm/StorageFormFields/StorageFormFields.test.tsx
index c5e9f8f648..9648aec6fb 100644
--- a/src/app/settings/views/Storage/StorageForm/StorageFormFields/StorageFormFields.test.tsx
+++ b/src/app/settings/views/Storage/StorageForm/StorageFormFields/StorageFormFields.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import StorageForm from "../StorageForm";
@@ -53,9 +52,7 @@ describe("StorageFormFields", () => {
render(
-
-
-
+
);
@@ -76,9 +73,7 @@ describe("StorageFormFields", () => {
render(
-
-
-
+
);
diff --git a/src/app/settings/views/Users/UserAdd/UserAdd.test.tsx b/src/app/settings/views/Users/UserAdd/UserAdd.test.tsx
index bb5d4de484..4b6d07cd0a 100644
--- a/src/app/settings/views/Users/UserAdd/UserAdd.test.tsx
+++ b/src/app/settings/views/Users/UserAdd/UserAdd.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import { UserAdd } from "./UserAdd";
@@ -23,9 +22,7 @@ describe("UserAdd", () => {
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Users/UserDeleteForm/UserDeleteForm.tsx b/src/app/settings/views/Users/UserDeleteForm/UserDeleteForm.tsx
index b22f6f5f09..671a3ef175 100644
--- a/src/app/settings/views/Users/UserDeleteForm/UserDeleteForm.tsx
+++ b/src/app/settings/views/Users/UserDeleteForm/UserDeleteForm.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { Col, Row } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import FormikForm from "@/app/base/components/FormikForm";
import { useAddMessage } from "@/app/base/hooks";
diff --git a/src/app/settings/views/Users/UserEdit/UserEdit.test.tsx b/src/app/settings/views/Users/UserEdit/UserEdit.test.tsx
index 8c17d4f9e7..9e1ca9dd84 100644
--- a/src/app/settings/views/Users/UserEdit/UserEdit.test.tsx
+++ b/src/app/settings/views/Users/UserEdit/UserEdit.test.tsx
@@ -1,5 +1,4 @@
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import { UserEdit } from "./UserEdit";
@@ -49,9 +48,7 @@ describe("UserEdit", () => {
-
-
-
+
,
{ state }
);
@@ -64,9 +61,7 @@ describe("UserEdit", () => {
-
-
-
+
,
{ state }
);
@@ -80,11 +75,9 @@ describe("UserEdit", () => {
{ pathname: "/settings/users/1/edit", key: "testKey" },
]}
>
-
-
- } path="/settings/users/:id/edit" />
-
-
+
+ } path="/settings/users/:id/edit" />
+
,
{ state }
);
diff --git a/src/app/settings/views/Users/UserForm/UserForm.test.tsx b/src/app/settings/views/Users/UserForm/UserForm.test.tsx
index 17a5645802..49327c2890 100644
--- a/src/app/settings/views/Users/UserForm/UserForm.test.tsx
+++ b/src/app/settings/views/Users/UserForm/UserForm.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import { UserForm, Labels as UserFormLabels } from "./UserForm";
@@ -36,9 +36,7 @@ describe("UserForm", () => {
it("can render", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -54,9 +52,7 @@ describe("UserForm", () => {
const { unmount } = render(
-
-
-
+
);
@@ -77,9 +73,7 @@ describe("UserForm", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
@@ -92,9 +86,7 @@ describe("UserForm", () => {
render(
-
-
-
+
);
@@ -152,9 +144,7 @@ describe("UserForm", () => {
render(
-
-
-
+
);
@@ -221,9 +211,7 @@ describe("UserForm", () => {
render(
-
-
-
+
);
@@ -287,9 +275,7 @@ describe("UserForm", () => {
render(
-
-
-
+
);
@@ -302,9 +288,7 @@ describe("UserForm", () => {
it("displays a checkbox for making the user a MAAS admin", () => {
renderWithMockStore(
-
-
-
+
,
{ state }
);
diff --git a/src/app/settings/views/Users/UserForm/UserForm.tsx b/src/app/settings/views/Users/UserForm/UserForm.tsx
index 97881fa5eb..59cc025faf 100644
--- a/src/app/settings/views/Users/UserForm/UserForm.tsx
+++ b/src/app/settings/views/Users/UserForm/UserForm.tsx
@@ -1,7 +1,7 @@
import { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import BaseUserForm from "@/app/base/components/UserForm";
import type { Props as UserFormProps } from "@/app/base/components/UserForm/UserForm";
diff --git a/src/app/settings/views/Users/UsersList/UsersList.test.tsx b/src/app/settings/views/Users/UsersList/UsersList.test.tsx
index 86cff53903..c9ce8e3c3d 100644
--- a/src/app/settings/views/Users/UsersList/UsersList.test.tsx
+++ b/src/app/settings/views/Users/UsersList/UsersList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import UsersList from "./UsersList";
@@ -61,9 +60,7 @@ describe("UsersList", () => {
-
-
-
+
,
{ state }
);
@@ -79,9 +76,7 @@ describe("UsersList", () => {
-
-
-
+
,
{ state }
);
@@ -99,9 +94,7 @@ describe("UsersList", () => {
-
-
-
+
);
@@ -118,9 +111,7 @@ describe("UsersList", () => {
-
-
-
+
);
@@ -134,9 +125,7 @@ describe("UsersList", () => {
-
-
-
+
,
{ state }
);
@@ -156,9 +145,7 @@ describe("UsersList", () => {
-
-
-
+
,
{ state }
);
diff --git a/src/app/subnets/components/DHCPSnippets/DHCPSnippets.test.tsx b/src/app/subnets/components/DHCPSnippets/DHCPSnippets.test.tsx
index c77f846332..19d01a2d52 100644
--- a/src/app/subnets/components/DHCPSnippets/DHCPSnippets.test.tsx
+++ b/src/app/subnets/components/DHCPSnippets/DHCPSnippets.test.tsx
@@ -1,5 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import DHCPSnippets from "./DHCPSnippets";
@@ -58,16 +58,17 @@ it("selects the correct subnets to display in the table", () => {
- (
-
- )}
- exact
- path={urls.subnets.subnet.index(null)}
- />
+
+
+ }
+ path={urls.subnets.subnet.index(null)}
+ />
+
);
diff --git a/src/app/subnets/components/ReservedRangeForm/ReservedRangeForm.test.tsx b/src/app/subnets/components/ReservedRangeForm/ReservedRangeForm.test.tsx
index 5ba4d55cdd..77e89fdb8a 100644
--- a/src/app/subnets/components/ReservedRangeForm/ReservedRangeForm.test.tsx
+++ b/src/app/subnets/components/ReservedRangeForm/ReservedRangeForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ReservedRangeForm, { Labels } from "./ReservedRangeForm";
@@ -46,9 +45,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -62,9 +59,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -78,9 +73,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -105,9 +98,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -126,13 +117,11 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -170,9 +159,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -202,9 +189,7 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
@@ -235,12 +220,10 @@ describe("ReservedRangeForm", () => {
-
-
-
+
);
diff --git a/src/app/subnets/components/ReservedRanges/ReservedRanges.test.tsx b/src/app/subnets/components/ReservedRanges/ReservedRanges.test.tsx
index cb6a8481dc..48b11165a9 100644
--- a/src/app/subnets/components/ReservedRanges/ReservedRanges.test.tsx
+++ b/src/app/subnets/components/ReservedRanges/ReservedRanges.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ReservedRanges, { Labels } from "./ReservedRanges";
@@ -54,9 +53,7 @@ it("renders for a subnet", () => {
render(
-
-
-
+
);
@@ -93,9 +90,7 @@ it("renders for a vlan", () => {
render(
-
-
-
+
);
@@ -126,9 +121,7 @@ it("displays an empty message for a subnet", () => {
render(
-
-
-
+
);
@@ -143,9 +136,7 @@ it("displays an empty message for a vlan", () => {
render(
-
-
-
+
);
@@ -160,9 +151,7 @@ it("displays a message if there are no subnets in a VLAN", () => {
render(
-
-
-
+
);
@@ -178,9 +167,7 @@ it("displays content when it is dynamic", () => {
render(
-
-
-
+
);
@@ -208,9 +195,7 @@ it("displays content when it is reserved", () => {
render(
-
-
-
+
);
@@ -238,9 +223,7 @@ it("displays an add button when it is reserved", () => {
render(
-
-
-
+
);
@@ -258,9 +241,7 @@ it("displays an add button when it is dynamic", async () => {
render(
-
-
-
+
);
@@ -287,9 +268,7 @@ it("disables the add button if there are no subnets in a VLAN", () => {
render(
-
-
-
+
);
@@ -306,9 +285,7 @@ it("displays the subnet column when the table is for a VLAN", () => {
render(
-
-
-
+
);
@@ -324,9 +301,7 @@ it("does not display the subnet column when the table is for a subnet", () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/FabricDetails/EditFabric/EditFabric.test.tsx b/src/app/subnets/views/FabricDetails/EditFabric/EditFabric.test.tsx
index 6b2f66bc83..9fb03fd50f 100644
--- a/src/app/subnets/views/FabricDetails/EditFabric/EditFabric.test.tsx
+++ b/src/app/subnets/views/FabricDetails/EditFabric/EditFabric.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import EditFabric from "./EditFabric";
@@ -33,9 +32,7 @@ it("dispatches an update action on submit", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/FabricDetails/FabricDetails.test.tsx b/src/app/subnets/views/FabricDetails/FabricDetails.test.tsx
index 4239838af7..b174f9e86e 100644
--- a/src/app/subnets/views/FabricDetails/FabricDetails.test.tsx
+++ b/src/app/subnets/views/FabricDetails/FabricDetails.test.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import FabricDetails from "./FabricDetails";
diff --git a/src/app/subnets/views/FabricDetails/FabricDetailsHeader/FabricDeleteForm/FabricDeleteForm.test.tsx b/src/app/subnets/views/FabricDetails/FabricDetailsHeader/FabricDeleteForm/FabricDeleteForm.test.tsx
index 356a4e2d51..707cd7e675 100644
--- a/src/app/subnets/views/FabricDetails/FabricDetailsHeader/FabricDeleteForm/FabricDeleteForm.test.tsx
+++ b/src/app/subnets/views/FabricDetails/FabricDetailsHeader/FabricDeleteForm/FabricDeleteForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FabricDeleteForm from "./FabricDeleteForm";
@@ -22,9 +21,7 @@ it("does not allow deletion if the fabric is the default fabric", () => {
render(
-
-
-
+
);
@@ -51,9 +48,7 @@ it("does not allow deletion if the fabric has subnets attached", () => {
render(
-
-
-
+
);
@@ -75,9 +70,7 @@ it(`displays a delete confirmation if the fabric is not the default and has no
render(
-
-
-
+
);
@@ -96,9 +89,7 @@ it("deletes the fabric when confirmed", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/FabricDetails/FabricSummary/FabricSummary.test.tsx b/src/app/subnets/views/FabricDetails/FabricSummary/FabricSummary.test.tsx
index 26a02d5322..9c39a76f02 100644
--- a/src/app/subnets/views/FabricDetails/FabricSummary/FabricSummary.test.tsx
+++ b/src/app/subnets/views/FabricDetails/FabricSummary/FabricSummary.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import FabricSummary from "./FabricSummary";
@@ -32,9 +31,7 @@ it("renders correct details", () => {
render(
-
-
-
+
);
@@ -60,9 +57,7 @@ it("can open and close the Edit fabric summary form", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/FabricDetails/FabricVLANs/FabricVLANs.test.tsx b/src/app/subnets/views/FabricDetails/FabricVLANs/FabricVLANs.test.tsx
index 1a4b0602b1..d1f3567de3 100644
--- a/src/app/subnets/views/FabricDetails/FabricVLANs/FabricVLANs.test.tsx
+++ b/src/app/subnets/views/FabricDetails/FabricVLANs/FabricVLANs.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import FabricVLANs from "./FabricVLANs";
@@ -29,13 +28,12 @@ it("renders correct details", () => {
-
+
}
- exact
+ element={}
path={urls.subnets.fabric.index({ id: fabric.id })}
/>
-
+
);
@@ -108,9 +106,7 @@ it("handles a VLAN without any subnets", () => {
{ pathname: urls.subnets.fabric.index({ id: fabric.id }) },
]}
>
-
-
-
+
);
@@ -157,9 +153,7 @@ it("handles a VLAN with multiple subnets", () => {
{ pathname: urls.subnets.fabric.index({ id: fabric.id }) },
]}
>
-
-
-
+
);
diff --git a/src/app/subnets/views/FormActions/components/AddFabric.test.tsx b/src/app/subnets/views/FormActions/components/AddFabric.test.tsx
index 81832d89b0..a1185b3106 100644
--- a/src/app/subnets/views/FormActions/components/AddFabric.test.tsx
+++ b/src/app/subnets/views/FormActions/components/AddFabric.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddFabric from "./AddFabric";
@@ -18,9 +17,7 @@ const renderTestCase = () => {
-
-
-
+
);
diff --git a/src/app/subnets/views/FormActions/components/AddSpace.test.tsx b/src/app/subnets/views/FormActions/components/AddSpace.test.tsx
index 4b9c9284e2..615e0d63dc 100644
--- a/src/app/subnets/views/FormActions/components/AddSpace.test.tsx
+++ b/src/app/subnets/views/FormActions/components/AddSpace.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddSpace from "./AddSpace";
@@ -17,9 +16,7 @@ test("correctly dispatches space cleanup and create actions on form submit", asy
-
- undefined} />
-
+ undefined} />
);
diff --git a/src/app/subnets/views/FormActions/components/AddSubnet.test.tsx b/src/app/subnets/views/FormActions/components/AddSubnet.test.tsx
index 298b2718f5..5be41ad666 100644
--- a/src/app/subnets/views/FormActions/components/AddSubnet.test.tsx
+++ b/src/app/subnets/views/FormActions/components/AddSubnet.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddSubnet from "./AddSubnet";
@@ -40,9 +39,7 @@ it("correctly dispatches subnet cleanup and create actions on form submit", asyn
render(
-
- undefined} />
-
+ undefined} />
);
diff --git a/src/app/subnets/views/FormActions/components/AddVlan.test.tsx b/src/app/subnets/views/FormActions/components/AddVlan.test.tsx
index 9e4ed41623..78a499f3e8 100644
--- a/src/app/subnets/views/FormActions/components/AddVlan.test.tsx
+++ b/src/app/subnets/views/FormActions/components/AddVlan.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddVlan from "./AddVlan";
@@ -15,9 +14,7 @@ it("displays validation messages for VID", async () => {
render(
-
- undefined} />
-
+ undefined} />
);
@@ -69,9 +66,7 @@ it("correctly dispatches VLAN cleanup and create actions on form submit", async
render(
-
- undefined} />
-
+ undefined} />
);
diff --git a/src/app/subnets/views/SpaceDetails/SpaceDetails.test.tsx b/src/app/subnets/views/SpaceDetails/SpaceDetails.test.tsx
index 1f57563a18..5f6d2c288b 100644
--- a/src/app/subnets/views/SpaceDetails/SpaceDetails.test.tsx
+++ b/src/app/subnets/views/SpaceDetails/SpaceDetails.test.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import SpaceDetails from "./SpaceDetails";
diff --git a/src/app/subnets/views/SpaceDetails/SpaceDetailsHeader/SpaceDetailsHeader.test.tsx b/src/app/subnets/views/SpaceDetails/SpaceDetailsHeader/SpaceDetailsHeader.test.tsx
index 8c4777adbe..241a6dcbf4 100644
--- a/src/app/subnets/views/SpaceDetails/SpaceDetailsHeader/SpaceDetailsHeader.test.tsx
+++ b/src/app/subnets/views/SpaceDetails/SpaceDetailsHeader/SpaceDetailsHeader.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { Router, Route } from "react-router";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import { SpaceDetailsSidePanelViews } from "../constants";
@@ -37,19 +37,18 @@ const renderTestCase = (
...render(
-
+
(
+ element={
- )}
- exact
+ }
path={urls.subnets.space.index({ id: space.id })}
/>
-
+
),
diff --git a/src/app/subnets/views/SpaceDetails/SpaceSubnets/SpaceSubnets.test.tsx b/src/app/subnets/views/SpaceDetails/SpaceSubnets/SpaceSubnets.test.tsx
index dc7745746c..bddbac904e 100644
--- a/src/app/subnets/views/SpaceDetails/SpaceSubnets/SpaceSubnets.test.tsx
+++ b/src/app/subnets/views/SpaceDetails/SpaceSubnets/SpaceSubnets.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import SpaceSubnets from "./SpaceSubnets";
@@ -44,13 +43,12 @@ it("displays a message when there are no subnets", async () => {
-
+
}
- exact
+ element={}
path={urls.subnets.space.index({ id: space.id })}
/>
-
+
);
@@ -82,13 +80,12 @@ it("displays subnet details correctly", async () => {
-
+
}
- exact
+ element={}
path={urls.subnets.space.index({ id: space.id })}
/>
-
+
);
diff --git a/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummary.test.tsx b/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummary.test.tsx
index e850d79bf5..94babc8533 100644
--- a/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummary.test.tsx
+++ b/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummary.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SpaceSummary from "./SpaceSummary";
@@ -46,9 +45,7 @@ it("can open and close the Edit space summary form", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummaryForm/SpaceSummaryForm.test.tsx b/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummaryForm/SpaceSummaryForm.test.tsx
index 8810b1968e..b3643b65c8 100644
--- a/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummaryForm/SpaceSummaryForm.test.tsx
+++ b/src/app/subnets/views/SpaceDetails/SpaceSummary/SpaceSummaryForm/SpaceSummaryForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SpaceSummaryForm from "./SpaceSummaryForm";
@@ -33,9 +32,7 @@ it("dispatches an update action on submit", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/StaticRoutes/AddStaticRouteForm/AddStaticRouteForm.test.tsx b/src/app/subnets/views/SubnetDetails/StaticRoutes/AddStaticRouteForm/AddStaticRouteForm.test.tsx
index 697ff0822b..4b9a875c6d 100644
--- a/src/app/subnets/views/SubnetDetails/StaticRoutes/AddStaticRouteForm/AddStaticRouteForm.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/StaticRoutes/AddStaticRouteForm/AddStaticRouteForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels } from "../StaticRoutes";
@@ -37,9 +36,7 @@ it("dispatches a correct action on add static route form submit", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/StaticRoutes/EditStaticRouteForm/EditStaticRouteForm.test.tsx b/src/app/subnets/views/SubnetDetails/StaticRoutes/EditStaticRouteForm/EditStaticRouteForm.test.tsx
index ae15a1cdda..fe079aabfe 100644
--- a/src/app/subnets/views/SubnetDetails/StaticRoutes/EditStaticRouteForm/EditStaticRouteForm.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/StaticRoutes/EditStaticRouteForm/EditStaticRouteForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Labels } from "../StaticRoutes";
@@ -29,9 +28,7 @@ it("displays loading text on load", async () => {
render(
-
-
-
+
);
@@ -72,9 +69,7 @@ it("dispatches a correct action on edit static route form submit", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/StaticRoutes/StaticRoutes.test.tsx b/src/app/subnets/views/SubnetDetails/StaticRoutes/StaticRoutes.test.tsx
index b4bb994c40..0403c5a0b1 100644
--- a/src/app/subnets/views/SubnetDetails/StaticRoutes/StaticRoutes.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/StaticRoutes/StaticRoutes.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { AddStaticRouteFormLabels } from "./AddStaticRouteForm/AddStaticRouteForm";
@@ -35,9 +34,7 @@ it("renders for a subnet", () => {
render(
-
-
-
+
);
@@ -83,9 +80,7 @@ it("has a button to open the static route form", async () => {
render(
-
-
-
+
);
@@ -118,9 +113,7 @@ it("has a button to open the edit static route form", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetDetails.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetDetails.test.tsx
index 53e037b097..f696edccf7 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetDetails.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetDetails.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import SubnetDetails from "./SubnetDetails";
@@ -21,14 +20,12 @@ it("dispatches actions to fetch necessary data and set subnet as active on mount
-
-
- }
- path={urls.subnets.subnet.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.subnet.index(null)}
+ />
+
);
@@ -56,14 +53,12 @@ it("dispatches actions to unset active subnet and clean up on unmount", () => {
-
-
- }
- path={urls.subnets.subnet.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.subnet.index(null)}
+ />
+
);
@@ -100,14 +95,12 @@ it("displays a message if the subnet does not exist", () => {
-
-
- }
- path={urls.subnets.subnet.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.subnet.index(null)}
+ />
+
);
@@ -128,14 +121,12 @@ it("shows a spinner if the subnet has not loaded yet", () => {
-
-
- }
- path={urls.subnets.subnet.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.subnet.index(null)}
+ />
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx
index 3863f5a473..767f163b60 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx
@@ -1,8 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { Router } from "react-router";
-import { Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import DeleteSubnet from "./DeleteSubnet";
@@ -56,9 +55,7 @@ it("displays a correct error message for a subnet with IPs obtained through DHCP
render(
-
-
-
+
);
@@ -83,9 +80,7 @@ it("displays a message if DHCP is disabled on the VLAN", () => {
render(
-
-
-
+
);
@@ -110,9 +105,7 @@ it("does not display a message if DHCP is enabled on the VLAN", () => {
render(
-
-
-
+
);
@@ -138,9 +131,7 @@ it("dispatches an action to load vlans and subnets if not loaded", () => {
render(
-
-
-
+
);
@@ -165,9 +156,7 @@ it("dispatches a delete action on submit", async () => {
render(
-
-
-
+
);
@@ -190,19 +179,16 @@ it("redirects on save", async () => {
});
const state = getRootState();
state.vlan.items[0].dhcp_on = false;
- const store = configureStore()(state);
+ let store = configureStore()(state);
const { rerender } = render(
-
+
(
-
- )}
- exact
+ element={}
path={urls.subnets.subnet.index({ id: subnetId })}
/>
-
+
);
@@ -212,19 +198,17 @@ it("redirects on save", async () => {
);
state.subnet.saved = true;
+ store = configureStore()(state);
rerender(
-
+
(
-
- )}
- exact
+ element={}
path={urls.subnets.subnet.index({ id: subnetId })}
/>
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/EditBootArchitectures/EditBootArchitectures.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/EditBootArchitectures/EditBootArchitectures.test.tsx
index 3576128496..d5a1599b3e 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/EditBootArchitectures/EditBootArchitectures.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/EditBootArchitectures/EditBootArchitectures.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import { Headers } from "./BootArchitecturesTable";
@@ -24,9 +23,7 @@ it("shows a spinner while data is loading", () => {
render(
-
-
-
+
);
@@ -55,9 +52,7 @@ it("initialises form data correctly", () => {
render(
-
-
-
+
);
@@ -89,9 +84,7 @@ it("can update the arches to disable", async () => {
render(
-
-
-
+
);
@@ -127,9 +120,7 @@ it("can dispatch an action to update subnet's disabled boot architectures", asyn
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.test.tsx
index 4d9c3957a1..c3183eb2e6 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import MapSubnet from "./MapSubnet";
@@ -19,9 +18,7 @@ it("shows a spinner while subnet is loading", () => {
render(
-
-
-
+
);
@@ -38,9 +35,7 @@ it("shows an error if the subnet is IPv6", () => {
render(
-
-
-
+
);
@@ -60,9 +55,7 @@ it("can map an IPv4 subnet", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.tsx b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.tsx
index f91331716e..3bfc5d89a3 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/MapSubnet/MapSubnet.tsx
@@ -2,7 +2,7 @@ import { useCallback } from "react";
import { Notification, Spinner, Strip } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import FormikForm from "@/app/base/components/FormikForm";
import { useCycled } from "@/app/base/hooks";
diff --git a/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummary.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummary.test.tsx
index df7d3217cc..28250bf3f0 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummary.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummary.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SubnetSummary from "./SubnetSummary";
@@ -79,9 +78,7 @@ it("renders correct section heading", async () => {
-
-
-
+
);
@@ -97,9 +94,7 @@ it("renders current values for static fields", async () => {
-
-
-
+
);
@@ -125,9 +120,7 @@ it("renders the correct value for 'VLAN'", async () => {
-
-
-
+
);
@@ -141,9 +134,7 @@ it("renders the correct value for 'Fabric'", async () => {
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummaryForm/SubnetSummaryForm.test.tsx b/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummaryForm/SubnetSummaryForm.test.tsx
index 5c4a37a958..e8b1e46175 100644
--- a/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummaryForm/SubnetSummaryForm.test.tsx
+++ b/src/app/subnets/views/SubnetDetails/SubnetSummary/SubnetSummaryForm/SubnetSummaryForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SubnetSummaryForm from "./SubnetSummaryForm";
@@ -40,9 +39,7 @@ it("can dispatch an action to update the subnet", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetsList/SubnetsList.tsx b/src/app/subnets/views/SubnetsList/SubnetsList.tsx
index 6866eb58ee..d2bcd16deb 100644
--- a/src/app/subnets/views/SubnetsList/SubnetsList.tsx
+++ b/src/app/subnets/views/SubnetsList/SubnetsList.tsx
@@ -2,7 +2,7 @@ import { useEffect, useCallback } from "react";
import { MainToolbar } from "@canonical/maas-react-components";
import { ContextualMenu } from "@canonical/react-components";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import SubnetsControls from "./SubnetsControls";
import SubnetsTable from "./SubnetsTable";
diff --git a/src/app/subnets/views/SubnetsList/SubnetsTable/SubnetsTable.test.tsx b/src/app/subnets/views/SubnetsList/SubnetsTable/SubnetsTable.test.tsx
index f9c20b8563..5a0dfba6b1 100644
--- a/src/app/subnets/views/SubnetsList/SubnetsTable/SubnetsTable.test.tsx
+++ b/src/app/subnets/views/SubnetsList/SubnetsTable/SubnetsTable.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import SubnetsTable from "./SubnetsTable";
@@ -43,9 +42,7 @@ it("renders a single table variant at a time", () => {
render(
-
-
-
+
);
@@ -61,9 +58,7 @@ it("renders Subnets by Fabric table when grouping by Fabric", () => {
render(
-
-
-
+
);
@@ -80,9 +75,7 @@ it("renders Subnets by Space table when grouping by Space", () => {
render(
-
-
-
+
);
@@ -99,9 +92,7 @@ it("displays a correct number of pages", () => {
render(
-
-
-
+
);
@@ -133,9 +124,7 @@ it("updates the list of items correctly when navigating to another page", async
render(
-
-
-
+
);
@@ -176,9 +165,7 @@ it("doesn't display pagination if rows are within items per page limit", () => {
render(
-
-
-
+
);
@@ -199,9 +186,7 @@ it("displays correctly paginated rows", async () => {
render(
-
-
-
+
);
@@ -244,9 +229,7 @@ it("displays the last available page once the currently active has no items", as
const { rerender } = render(
-
-
-
+
);
@@ -276,9 +259,7 @@ it("displays the last available page once the currently active has no items", as
rerender(
-
-
-
+
);
@@ -304,9 +285,7 @@ it("remains on the same page once the data is updated and page is still availabl
const { rerender } = render(
-
-
-
+
);
@@ -332,9 +311,7 @@ it("remains on the same page once the data is updated and page is still availabl
rerender(
-
-
-
+
);
diff --git a/src/app/subnets/views/SubnetsList/SubnetsTable/components.tsx b/src/app/subnets/views/SubnetsList/SubnetsTable/components.tsx
index 72bd18cd8e..7af58918f2 100644
--- a/src/app/subnets/views/SubnetsList/SubnetsTable/components.tsx
+++ b/src/app/subnets/views/SubnetsList/SubnetsTable/components.tsx
@@ -3,7 +3,7 @@ import { useState } from "react";
import { Button } from "@canonical/react-components";
import classNames from "classnames";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { SubnetsColumns } from "./constants";
import type {
diff --git a/src/app/subnets/views/VLANDetails/ConfigureDHCP/DHCPReservedRanges/DHCPReservedRanges.test.tsx b/src/app/subnets/views/VLANDetails/ConfigureDHCP/DHCPReservedRanges/DHCPReservedRanges.test.tsx
index 53ae84e234..a79c05e4a2 100644
--- a/src/app/subnets/views/VLANDetails/ConfigureDHCP/DHCPReservedRanges/DHCPReservedRanges.test.tsx
+++ b/src/app/subnets/views/VLANDetails/ConfigureDHCP/DHCPReservedRanges/DHCPReservedRanges.test.tsx
@@ -1,7 +1,6 @@
import { Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import type { ConfigureDHCPValues } from "../ConfigureDHCP";
@@ -37,11 +36,9 @@ it("does not render if DHCP is selected to be disabled", () => {
const { container } = render(
-
-
-
-
-
+
+
+
);
@@ -67,11 +64,9 @@ it("renders a table of IP ranges if the VLAN has any defined", () => {
render(
-
-
-
-
-
+
+
+
);
@@ -105,11 +100,9 @@ it(`renders only a subnet select field if no IP ranges exist and no subnet is
render(
-
-
-
-
-
+
+
+
);
@@ -153,11 +146,9 @@ it(`renders a subnet select field and prepopulated fields for a reserved range
render(
-
-
-
-
-
+
+
+
);
diff --git a/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.test.tsx b/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.test.tsx
index 1e3c068ae4..7e7fba9871 100644
--- a/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.test.tsx
+++ b/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DHCPStatus from "./DHCPStatus";
@@ -20,9 +19,7 @@ it("shows a spinner if data is loading", () => {
render(
-
-
-
+
);
@@ -41,9 +38,7 @@ it(`shows a warning and disables Configure DHCP button if there are no subnets
render(
-
-
-
+
);
@@ -71,9 +66,7 @@ it("does not show a warning if there are subnets attached to the VLAN", () => {
render(
-
-
-
+
);
@@ -99,9 +92,7 @@ it("renders correctly when a VLAN does not have DHCP enabled", () => {
render(
-
-
-
+
);
@@ -125,9 +116,7 @@ it("renders correctly when a VLAN has external DHCP", () => {
render(
-
-
-
+
);
@@ -159,9 +148,7 @@ it("renders correctly when a VLAN has relayed DHCP", () => {
render(
-
-
-
+
);
@@ -191,9 +178,7 @@ it("renders correctly when a VLAN has MAAS-configured DHCP without high availabi
render(
-
-
-
+
);
@@ -240,9 +225,7 @@ it("renders correctly when a VLAN has MAAS-configured DHCP with high availabilit
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.tsx b/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.tsx
index 9a478720ef..a751c05109 100644
--- a/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.tsx
+++ b/src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.tsx
@@ -7,7 +7,7 @@ import {
Spinner,
} from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import ControllerLink from "@/app/base/components/ControllerLink";
import Definition from "@/app/base/components/Definition";
diff --git a/src/app/subnets/views/VLANDetails/EditVLAN/EditVLAN.test.tsx b/src/app/subnets/views/VLANDetails/EditVLAN/EditVLAN.test.tsx
index 6246e59c7d..ca44627527 100644
--- a/src/app/subnets/views/VLANDetails/EditVLAN/EditVLAN.test.tsx
+++ b/src/app/subnets/views/VLANDetails/EditVLAN/EditVLAN.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import EditVLAN from "./EditVLAN";
@@ -43,9 +42,7 @@ describe("EditVLAN", () => {
-
-
-
+
);
@@ -59,9 +56,7 @@ describe("EditVLAN", () => {
-
-
-
+
);
@@ -101,9 +96,7 @@ describe("EditVLAN", () => {
-
-
-
+
);
@@ -134,9 +127,7 @@ describe("EditVLAN", () => {
-
-
-
+
);
diff --git a/src/app/subnets/views/VLANDetails/VLANDeleteForm/VLANDeleteForm.test.tsx b/src/app/subnets/views/VLANDetails/VLANDeleteForm/VLANDeleteForm.test.tsx
index d2719a7b51..e6679bf59a 100644
--- a/src/app/subnets/views/VLANDetails/VLANDeleteForm/VLANDeleteForm.test.tsx
+++ b/src/app/subnets/views/VLANDetails/VLANDeleteForm/VLANDeleteForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VLANDeleteForm from "./VLANDeleteForm";
@@ -30,9 +29,7 @@ it("does not allow deletion if the VLAN is the default VLAN in its fabric", () =
render(
-
-
-
+
);
@@ -63,9 +60,7 @@ it("displays a delete confirmation if the VLAN is not the default for its fabric
render(
-
-
-
+
);
@@ -94,9 +89,7 @@ it("deletes the VLAN when confirmed", async () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/VLANDetails/VLANDetails.test.tsx b/src/app/subnets/views/VLANDetails/VLANDetails.test.tsx
index 91e2c12070..8635f41c06 100644
--- a/src/app/subnets/views/VLANDetails/VLANDetails.test.tsx
+++ b/src/app/subnets/views/VLANDetails/VLANDetails.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import VLANDetails from "./VLANDetails";
@@ -24,14 +23,12 @@ it("dispatches actions to fetch necessary data and set vlan as active on mount",
-
-
- }
- path={urls.subnets.vlan.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.vlan.index(null)}
+ />
+
);
@@ -55,14 +52,12 @@ it("dispatches actions to unset active vlan and clean up on unmount", () => {
-
-
- }
- path={urls.subnets.vlan.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.vlan.index(null)}
+ />
+
);
@@ -96,14 +91,12 @@ it("displays a message if the vlan does not exist", () => {
-
-
- }
- path={urls.subnets.vlan.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.vlan.index(null)}
+ />
+
);
@@ -124,14 +117,12 @@ it("shows a spinner if the vlan has not loaded yet", () => {
-
-
- }
- path={urls.subnets.vlan.index(null)}
- />
-
-
+
+ }
+ path={urls.subnets.vlan.index(null)}
+ />
+
);
diff --git a/src/app/subnets/views/VLANDetails/VLANSubnets/VLANSubnets.test.tsx b/src/app/subnets/views/VLANDetails/VLANSubnets/VLANSubnets.test.tsx
index 1cd239c2f7..b3e528ccb4 100644
--- a/src/app/subnets/views/VLANDetails/VLANSubnets/VLANSubnets.test.tsx
+++ b/src/app/subnets/views/VLANDetails/VLANSubnets/VLANSubnets.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VLANSubnets from "./VLANSubnets";
@@ -29,9 +28,7 @@ it("renders correct details", () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/VLANDetails/VLANSummary/VLANControllers/VLANControllers.test.tsx b/src/app/subnets/views/VLANDetails/VLANSummary/VLANControllers/VLANControllers.test.tsx
index cfc26bc54b..285f3e2296 100644
--- a/src/app/subnets/views/VLANDetails/VLANSummary/VLANControllers/VLANControllers.test.tsx
+++ b/src/app/subnets/views/VLANDetails/VLANSummary/VLANControllers/VLANControllers.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VLANControllers from "./VLANControllers";
@@ -47,9 +46,7 @@ it("displays a spinner when loading controllers", () => {
render(
-
-
-
+
);
@@ -61,9 +58,7 @@ it("renders correct details", () => {
render(
-
-
-
+
);
diff --git a/src/app/subnets/views/VLANDetails/VLANSummary/VLANSummary.test.tsx b/src/app/subnets/views/VLANDetails/VLANSummary/VLANSummary.test.tsx
index 656e0be40e..cc7b7dede2 100644
--- a/src/app/subnets/views/VLANDetails/VLANSummary/VLANSummary.test.tsx
+++ b/src/app/subnets/views/VLANDetails/VLANSummary/VLANSummary.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import VLANSummary from "./VLANSummary";
@@ -55,9 +54,7 @@ it("renders correct details", () => {
render(
-
-
-
+
);
@@ -81,9 +78,7 @@ it("can display the edit form", async () => {
render(
-
-
-
+
);
diff --git a/src/app/tags/components/AddTagForm/AddTagForm.test.tsx b/src/app/tags/components/AddTagForm/AddTagForm.test.tsx
index 2058b4102a..dc21de126e 100644
--- a/src/app/tags/components/AddTagForm/AddTagForm.test.tsx
+++ b/src/app/tags/components/AddTagForm/AddTagForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import AddTagForm, { Label } from "./AddTagForm";
@@ -32,9 +31,7 @@ it("dispatches an action to create a tag", async () => {
render(
-
-
-
+
);
@@ -65,15 +62,12 @@ it("returns the newly created tag on save", async () => {
render(
-
+
(
-
- )}
- exact
+ element={}
path={urls.tags.index}
/>
-
+
);
diff --git a/src/app/tags/components/AppliedTo/AppliedTo.test.tsx b/src/app/tags/components/AppliedTo/AppliedTo.test.tsx
index 12916c57fd..150bc76d10 100644
--- a/src/app/tags/components/AppliedTo/AppliedTo.test.tsx
+++ b/src/app/tags/components/AppliedTo/AppliedTo.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AppliedTo from "./AppliedTo";
@@ -41,9 +40,7 @@ it("links to nodes", () => {
-
-
-
+
);
@@ -89,9 +86,7 @@ it("displays a message if there are no nodes", () => {
-
-
-
+
);
diff --git a/src/app/tags/components/NodesTagsLink/NodesTagsLink.test.tsx b/src/app/tags/components/NodesTagsLink/NodesTagsLink.test.tsx
index 9bfc611ef2..2542f9973d 100644
--- a/src/app/tags/components/NodesTagsLink/NodesTagsLink.test.tsx
+++ b/src/app/tags/components/NodesTagsLink/NodesTagsLink.test.tsx
@@ -1,5 +1,4 @@
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import NodesTagsLink from "./NodesTagsLink";
@@ -12,13 +11,7 @@ import { render, screen } from "@/testing/utils";
it("create a link to machines", () => {
render(
-
-
-
+
);
const machineLink = screen.getByRole("link", {
@@ -34,13 +27,11 @@ it("create a link to machines", () => {
it("create a link to controllers", () => {
render(
-
-
-
+
);
const controllerLink = screen.getByRole("link", {
@@ -56,9 +47,7 @@ it("create a link to controllers", () => {
it("create a link to devices", () => {
render(
-
-
-
+
);
const deviceLink = screen.getByRole("link", {
diff --git a/src/app/tags/components/NodesTagsLink/NodesTagsLink.tsx b/src/app/tags/components/NodesTagsLink/NodesTagsLink.tsx
index 576072ee41..0f3e1a95cc 100644
--- a/src/app/tags/components/NodesTagsLink/NodesTagsLink.tsx
+++ b/src/app/tags/components/NodesTagsLink/NodesTagsLink.tsx
@@ -1,5 +1,5 @@
import pluralize from "pluralize";
-import { Link, useLocation } from "react-router-dom-v5-compat";
+import { Link, useLocation } from "react-router-dom";
import urls from "@/app/base/urls";
import { ControllerMeta } from "@/app/store/controller/types";
diff --git a/src/app/tags/components/TagDetails/TagDetails.test.tsx b/src/app/tags/components/TagDetails/TagDetails.test.tsx
index 1dcf1b2305..142f74c262 100644
--- a/src/app/tags/components/TagDetails/TagDetails.test.tsx
+++ b/src/app/tags/components/TagDetails/TagDetails.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import TagDetails from "./TagDetails";
@@ -38,13 +37,12 @@ it("dispatches actions to fetch necessary data", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -73,13 +71,12 @@ it("displays a message if the tag does not exist", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -100,13 +97,12 @@ it("shows a spinner if the tag has not loaded yet", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -121,13 +117,12 @@ it("displays the tag name when not narrow", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -141,13 +136,12 @@ it("does not display the tag name when narrow", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
diff --git a/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.test.tsx b/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.test.tsx
index 98ec08b838..e66842c481 100644
--- a/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.test.tsx
+++ b/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import AddTagForm, { Label } from "./AddTagForm";
@@ -37,9 +36,7 @@ it("dispatches an action to create a tag", async () => {
render(
-
-
-
+
);
@@ -107,9 +104,7 @@ it("sends analytics when there is a definition", async () => {
const TagForm = () => (
-
-
-
+
);
@@ -145,9 +140,7 @@ it("sends analytics when there is no definition", async () => {
const TagForm = () => (
-
-
-
+
);
@@ -178,9 +171,7 @@ it("shows a confirmation when an automatic tag is added", async () => {
render(
-
-
-
+
);
@@ -213,9 +204,7 @@ it("shows an error if tag name is invalid", async () => {
render(
-
-
-
+
);
diff --git a/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.tsx b/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.tsx
index 4f2cb47e59..acdd5afcd5 100644
--- a/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.tsx
+++ b/src/app/tags/components/TagsHeader/AddTagForm/AddTagForm.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { Col, NotificationSeverity, Row } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import * as Yup from "yup";
import FormikField from "@/app/base/components/FormikField";
diff --git a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.test.tsx b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.test.tsx
index 1a4fe93a7c..fb70697768 100644
--- a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.test.tsx
+++ b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.test.tsx
@@ -2,8 +2,8 @@ import { NotificationSeverity } from "@canonical/react-components";
import * as reduxToolkit from "@reduxjs/toolkit";
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Route, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import type { Mock } from "vitest";
@@ -61,9 +61,7 @@ it("dispatches an action to delete a tag", async () => {
render(
-
-
-
+
);
@@ -85,9 +83,7 @@ it("dispatches an action to add a notification when tag successfully deleted", a
render(
-
-
-
+
);
@@ -109,9 +105,7 @@ it("displays a message when deleting a tag on a machine", async () => {
render(
-
-
-
+
);
@@ -134,9 +128,7 @@ it("displays a message when deleting a tag not on a machine", async () => {
render(
-
-
-
+
);
@@ -163,13 +155,12 @@ it("can return to the list on cancel", async () => {
render(
-
+
}
- exact
+ element={}
path={path}
/>
-
+
);
@@ -202,15 +193,12 @@ it("can return to the details on cancel", async () => {
render(
-
+
(
-
- )}
- exact
+ element={}
path={path}
/>
-
+
);
diff --git a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.tsx b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.tsx
index 95c632964c..f1d72b7f8c 100644
--- a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.tsx
+++ b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagForm.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { Col, NotificationSeverity, Row } from "@canonical/react-components";
import { useDispatch, useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import DeleteTagFormWarnings from "./DeleteTagFormWarnings";
diff --git a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.test.tsx b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.test.tsx
index 20352efc2f..3d89362555 100644
--- a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.test.tsx
+++ b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.test.tsx
@@ -1,7 +1,6 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import DeleteTagFormWarnings from "./DeleteTagFormWarnings";
@@ -69,9 +68,7 @@ it("does not display a kernel options warning for non-deployed machines", async
render(
-
-
-
+
);
@@ -99,9 +96,7 @@ it("displays warning when deleting a tag with kernel options", async () => {
render(
-
-
-
+
);
@@ -135,9 +130,7 @@ it("displays a kernel options warning with multiple machines", async () => {
render(
-
-
-
+
);
@@ -165,9 +158,7 @@ it("displays a kernel options warning with one machine", async () => {
render(
-
-
-
+
);
@@ -195,9 +186,7 @@ it("links to a page to display deployed machines", async () => {
render(
-
-
-
+
);
@@ -218,9 +207,7 @@ it("displays warning when deleting a tag applied to devices", async () => {
render(
-
-
-
+
);
@@ -241,9 +228,7 @@ it("displays warning when deleting a tag applied to controllers", async () => {
render(
-
-
-
+
);
@@ -264,9 +249,7 @@ it("generates the correct sentence for multiple nodes", async () => {
render(
-
-
-
+
);
diff --git a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.tsx b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.tsx
index 62704ca6ca..3534ad335f 100644
--- a/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.tsx
+++ b/src/app/tags/components/TagsHeader/DeleteTagForm/DeleteTagFormWarnings/DeleteTagFormWarnings.tsx
@@ -1,7 +1,7 @@
import { Notification } from "@canonical/react-components";
import pluralize from "pluralize";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import urls from "@/app/base/urls";
import { useFetchMachineCount } from "@/app/store/machine/utils/hooks";
diff --git a/src/app/tags/components/TagsHeader/TagsHeader.test.tsx b/src/app/tags/components/TagsHeader/TagsHeader.test.tsx
index 6c71eb6451..104c138ad2 100644
--- a/src/app/tags/components/TagsHeader/TagsHeader.test.tsx
+++ b/src/app/tags/components/TagsHeader/TagsHeader.test.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import type { Mock } from "vitest";
import TagsHeader, { Label } from "./TagsHeader";
diff --git a/src/app/tags/components/TagsHeader/TagsHeader.tsx b/src/app/tags/components/TagsHeader/TagsHeader.tsx
index 3ea322d991..9baedd5937 100644
--- a/src/app/tags/components/TagsHeader/TagsHeader.tsx
+++ b/src/app/tags/components/TagsHeader/TagsHeader.tsx
@@ -1,7 +1,7 @@
import { MainToolbar } from "@canonical/maas-react-components";
import { Button, Icon } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import SearchBox from "@/app/base/components/SearchBox";
import SegmentedControl from "@/app/base/components/SegmentedControl";
diff --git a/src/app/tags/views/TagDetails/TagDetails.test.tsx b/src/app/tags/views/TagDetails/TagDetails.test.tsx
index e23eb69607..7c888f39f3 100644
--- a/src/app/tags/views/TagDetails/TagDetails.test.tsx
+++ b/src/app/tags/views/TagDetails/TagDetails.test.tsx
@@ -1,4 +1,4 @@
-import { Route, Routes } from "react-router-dom-v5-compat";
+import { Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import TagDetails from "./TagDetails";
diff --git a/src/app/tags/views/TagList/TagList.test.tsx b/src/app/tags/views/TagList/TagList.test.tsx
index c34908d6b1..7a0a408cfa 100644
--- a/src/app/tags/views/TagList/TagList.test.tsx
+++ b/src/app/tags/views/TagList/TagList.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import TagList from "./TagList";
@@ -33,18 +32,16 @@ it("renders", () => {
render(
-
-
-
+
);
diff --git a/src/app/tags/views/TagList/TagTable/TagTable.test.tsx b/src/app/tags/views/TagList/TagTable/TagTable.test.tsx
index 7fca692103..d38645d5a3 100644
--- a/src/app/tags/views/TagList/TagTable/TagTable.test.tsx
+++ b/src/app/tags/views/TagList/TagTable/TagTable.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Route, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import TagTable, { Label, TestId } from "./TagTable";
@@ -51,17 +51,15 @@ it("displays tags", () => {
render(
-
-
-
+
);
@@ -78,17 +76,15 @@ it("displays the tags in order", () => {
render(
-
-
-
+
);
@@ -104,17 +100,15 @@ it("can change the sort order", async () => {
render(
-
-
-
+
);
@@ -153,17 +147,15 @@ it("displays the tags for the current page", () => {
render(
-
-
-
+
);
@@ -181,17 +173,15 @@ it("shows an icon for automatic tags", () => {
render(
-
-
-
+
);
@@ -208,17 +198,15 @@ it("does not show an icon for manual tags", () => {
render(
-
-
-
+
);
@@ -235,17 +223,15 @@ it("shows an icon for kernel options", () => {
render(
-
-
-
+
);
@@ -262,17 +248,15 @@ it("does not show an icon for tags without kernel options", () => {
render(
-
-
-
+
);
@@ -297,17 +281,15 @@ it("can link to nodes", () => {
render(
-
-
-
+
);
@@ -346,17 +328,15 @@ it("does not display a message if there are tags", () => {
render(
-
-
-
+
);
@@ -368,17 +348,15 @@ it("displays a message if there are no automatic tags", () => {
render(
-
-
-
+
);
@@ -392,17 +370,15 @@ it("displays a message if there are no manual tags", () => {
render(
-
-
-
+
);
@@ -416,17 +392,15 @@ it("displays a message if none match the search terms", () => {
render(
-
-
-
+
);
@@ -440,17 +414,15 @@ it("displays a message if none match the filter and search terms", () => {
render(
-
-
-
+
);
@@ -465,34 +437,30 @@ it("returns to the first page if the search changes", () => {
const { rerender } = render(
-
-
-
+
);
rerender(
-
-
-
+
);
@@ -505,34 +473,30 @@ it("returns to the first page if the filter changes", () => {
const { rerender } = render(
-
-
-
+
);
rerender(
-
-
-
+
);
@@ -549,9 +513,9 @@ it("can trigger the tag edit sidepanel", async () => {
render(
-
+
(
+ element={
{
setCurrentPage={vi.fn()}
tags={tags}
/>
- )}
- exact
+ }
path={path}
/>
-
+
);
diff --git a/src/app/tags/views/TagList/TagTable/TagTable.tsx b/src/app/tags/views/TagList/TagTable/TagTable.tsx
index a34cb17835..2b28a44a1e 100644
--- a/src/app/tags/views/TagList/TagTable/TagTable.tsx
+++ b/src/app/tags/views/TagList/TagTable/TagTable.tsx
@@ -7,7 +7,7 @@ import type {
PropsWithSpread,
} from "@canonical/react-components";
import { Icon, MainTable, Strip } from "@canonical/react-components";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { TAGS_PER_PAGE } from "../constants";
diff --git a/src/app/tags/views/TagMachines/TagMachines.test.tsx b/src/app/tags/views/TagMachines/TagMachines.test.tsx
index 1ff5566db7..1890f6305f 100644
--- a/src/app/tags/views/TagMachines/TagMachines.test.tsx
+++ b/src/app/tags/views/TagMachines/TagMachines.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import TagMachines, { Label } from "./TagMachines";
@@ -68,11 +67,9 @@ it("dispatches actions to fetch necessary data", () => {
-
-
- } path={urls.tags.tag.index(null)} />
-
-
+
+ } path={urls.tags.tag.index(null)} />
+
);
@@ -114,11 +111,9 @@ it("displays a message if the tag does not exist", () => {
-
-
- } path={urls.tags.tag.index(null)} />
-
-
+
+ } path={urls.tags.tag.index(null)} />
+
);
@@ -138,11 +133,9 @@ it("shows a spinner if the tag has not loaded yet", () => {
-
-
- } path={urls.tags.tag.index(null)} />
-
-
+
+ } path={urls.tags.tag.index(null)} />
+
);
@@ -156,11 +149,9 @@ it("displays the machine list", () => {
-
-
- } path={urls.tags.tag.index(null)} />
-
-
+
+ } path={urls.tags.tag.index(null)} />
+
);
diff --git a/src/app/tags/views/TagUpdate/TagUpdate.test.tsx b/src/app/tags/views/TagUpdate/TagUpdate.test.tsx
index 51e8e8d223..06ce6db5d2 100644
--- a/src/app/tags/views/TagUpdate/TagUpdate.test.tsx
+++ b/src/app/tags/views/TagUpdate/TagUpdate.test.tsx
@@ -1,7 +1,7 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
-import { MemoryRouter, Route, Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import configureStore from "redux-mock-store";
import TagUpdate from "./TagUpdate";
@@ -39,13 +39,12 @@ it("dispatches actions to fetch necessary data", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -74,13 +73,12 @@ it("shows a spinner if the tag has not loaded yet", () => {
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -93,9 +91,7 @@ it("can update the tag", async () => {
render(
-
-
-
+
);
@@ -137,13 +133,12 @@ it("goes to the tag details page if it can't go back", async () => {
render(
-
+
}
- exact
+ element={}
path={urls.tags.tag.index(null)}
/>
-
+
);
@@ -166,9 +161,7 @@ it("shows a confirmation when a tag's definition is updated", async () => {
render(
-
-
-
+
);
diff --git a/src/app/tags/views/Tags.tsx b/src/app/tags/views/Tags.tsx
index 2acae25098..8114c9d6a6 100644
--- a/src/app/tags/views/Tags.tsx
+++ b/src/app/tags/views/Tags.tsx
@@ -1,7 +1,7 @@
import { useState } from "react";
import { useSelector } from "react-redux";
-import { Route, Routes, useMatch } from "react-router-dom-v5-compat";
+import { Route, Routes, useMatch } from "react-router-dom";
import TagsHeader from "../components/TagsHeader";
import TagForms from "../components/TagsHeader/TagForms";
diff --git a/src/app/zones/views/ZoneDetails/ZoneDetails.test.tsx b/src/app/zones/views/ZoneDetails/ZoneDetails.test.tsx
index 041caa2d21..61bd129c57 100644
--- a/src/app/zones/views/ZoneDetails/ZoneDetails.test.tsx
+++ b/src/app/zones/views/ZoneDetails/ZoneDetails.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import ZoneDetails from "./ZoneDetails";
@@ -43,11 +42,9 @@ describe("ZoneDetails", () => {
-
-
- } path="/zone/:id" />
-
-
+
+ } path="/zone/:id" />
+
);
@@ -73,11 +70,9 @@ describe("ZoneDetails", () => {
-
-
- } path="/zone/:id" />
-
-
+
+ } path="/zone/:id" />
+
);
diff --git a/src/app/zones/views/ZoneDetails/ZoneDetailsForm/ZoneDetailsForm.test.tsx b/src/app/zones/views/ZoneDetails/ZoneDetailsForm/ZoneDetailsForm.test.tsx
index 757d99cd60..e275ce8cca 100644
--- a/src/app/zones/views/ZoneDetails/ZoneDetailsForm/ZoneDetailsForm.test.tsx
+++ b/src/app/zones/views/ZoneDetails/ZoneDetailsForm/ZoneDetailsForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ZoneDetailsForm from "./ZoneDetailsForm";
@@ -30,9 +29,7 @@ describe("ZoneDetailsForm", () => {
render(
-
-
-
+
);
@@ -46,9 +43,7 @@ describe("ZoneDetailsForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.test.tsx b/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.test.tsx
index 214836683a..770dc55687 100644
--- a/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.test.tsx
+++ b/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
-import { MemoryRouter, Route } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { MemoryRouter, Route, Routes } from "react-router-dom";
import configureStore from "redux-mock-store";
import ZoneDetailsHeader from "./ZoneDetailsHeader";
@@ -47,13 +46,9 @@ describe("ZoneDetailsHeader", () => {
-
- }
- />
-
+
+ } path="/zone/:id" />
+
);
@@ -70,13 +65,9 @@ describe("ZoneDetailsHeader", () => {
-
- }
- />
-
+
+ } path="/zone/:id" />
+
);
@@ -92,13 +83,9 @@ describe("ZoneDetailsHeader", () => {
-
- }
- />
-
+
+ } path="/zone/:id" />
+
);
@@ -115,13 +102,9 @@ describe("ZoneDetailsHeader", () => {
-
- }
- />
-
+
+ } path="/zone/:id" />
+
);
@@ -143,13 +126,9 @@ describe("ZoneDetailsHeader", () => {
-
- }
- />
-
+
+ } path="/zone/:id" />
+
);
diff --git a/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.tsx b/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.tsx
index 1b8cf1dec7..de4ad17684 100644
--- a/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.tsx
+++ b/src/app/zones/views/ZoneDetails/ZoneDetailsHeader/ZoneDetailsHeader.tsx
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { Button } from "@canonical/react-components";
import { useSelector, useDispatch } from "react-redux";
-import { useNavigate } from "react-router-dom-v5-compat";
+import { useNavigate } from "react-router-dom";
import DeleteConfirm from "./DeleteConfirm";
diff --git a/src/app/zones/views/ZonesList/ZonesListForm/ZonesListForm.test.tsx b/src/app/zones/views/ZonesList/ZonesListForm/ZonesListForm.test.tsx
index 11382ddbf1..bc6f74d80f 100644
--- a/src/app/zones/views/ZonesList/ZonesListForm/ZonesListForm.test.tsx
+++ b/src/app/zones/views/ZonesList/ZonesListForm/ZonesListForm.test.tsx
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
import configureStore from "redux-mock-store";
import ZonesListForm from "./ZonesListForm";
@@ -24,9 +23,7 @@ describe("ZonesListForm", () => {
render(
-
-
-
+
);
@@ -40,9 +37,7 @@ describe("ZonesListForm", () => {
render(
-
-
-
+
);
diff --git a/src/app/zones/views/ZonesList/ZonesListTable/ZonesListTable.tsx b/src/app/zones/views/ZonesList/ZonesListTable/ZonesListTable.tsx
index 4f5dcb0c56..6153808b3e 100644
--- a/src/app/zones/views/ZonesList/ZonesListTable/ZonesListTable.tsx
+++ b/src/app/zones/views/ZonesList/ZonesListTable/ZonesListTable.tsx
@@ -1,6 +1,6 @@
import { MainTable } from "@canonical/react-components";
import { useSelector } from "react-redux";
-import { Link } from "react-router-dom-v5-compat";
+import { Link } from "react-router-dom";
import { useFetchActions } from "@/app/base/hooks";
import urls from "@/app/base/urls";
diff --git a/src/index.tsx b/src/index.tsx
index 2d7c2e93fe..2bf1cc55cd 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -2,14 +2,13 @@ import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { Provider } from "react-redux";
-import { Router } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { HistoryRouter as Router } from "redux-first-history/rr6";
import packageInfo from "../package.json";
import App from "./app/App";
import SidePanelContextProvider from "./app/base/side-panel-context";
-import { history, store } from "./redux-store";
+import { store, history } from "./redux-store";
import * as serviceWorker from "./serviceWorker";
import "./scss/index.scss";
@@ -17,10 +16,13 @@ import "./scss/index.scss";
export const RootProviders = ({ children }: { children: JSX.Element }) => {
return (
-
-
- {children}
-
+
+ {children}
);
diff --git a/src/redux-store.ts b/src/redux-store.ts
index 1b87ba7663..2f010794da 100644
--- a/src/redux-store.ts
+++ b/src/redux-store.ts
@@ -9,11 +9,7 @@ import WebSocketClient from "./websocket-client";
const { createReduxHistory, routerMiddleware, routerReducer } =
createReduxHistoryContext({
- history: createBrowserHistory({
- basename: `${import.meta.env.VITE_APP_BASENAME}${
- import.meta.env.VITE_APP_VITE_BASENAME
- }`,
- }),
+ history: createBrowserHistory(),
});
const reducer = createRootReducer(routerReducer);
diff --git a/src/testing/factories/state.ts b/src/testing/factories/state.ts
index f015fa4a35..19df2b2a1b 100644
--- a/src/testing/factories/state.ts
+++ b/src/testing/factories/state.ts
@@ -1,4 +1,5 @@
import { define, random } from "cooky-cutter";
+import { Action } from "history";
import type { RouterState } from "redux-first-history";
import { bondOptions } from "./general";
@@ -651,11 +652,12 @@ export const locationState = define({
search: "",
state: null,
hash: "",
+ key: "",
});
export const routerState = define({
location: locationState,
- action: "POP",
+ action: Action.Pop,
});
export const rootState = define({
diff --git a/src/testing/utils.tsx b/src/testing/utils.tsx
index 3d1c970e12..1da2405fa0 100644
--- a/src/testing/utils.tsx
+++ b/src/testing/utils.tsx
@@ -5,8 +5,7 @@ import type { RenderOptions, RenderResult } from "@testing-library/react";
import { render, screen, renderHook } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Provider } from "react-redux";
-import { BrowserRouter } from "react-router-dom";
-import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
+import { BrowserRouter, Route, Routes } from "react-router-dom";
import type { MockStoreEnhanced } from "redux-mock-store";
import configureStore from "redux-mock-store";
@@ -125,19 +124,13 @@ export const BrowserRouterWithProvider = ({
initialSidePanelSize={sidePanelSize}
>
-
- {routePattern ? (
-
- {parentRoute ? (
- {route}
- ) : (
- route
- )}
-
- ) : (
- children
- )}
-
+ {routePattern ? (
+
+ {parentRoute ? {route} : route}
+
+ ) : (
+ children
+ )}
diff --git a/yarn.lock b/yarn.lock
index bb166d40dd..24ed19d18a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1764,13 +1764,6 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
-"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
- version "7.15.3"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"
- integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==
- dependencies:
- regenerator-runtime "^0.13.4"
-
"@babel/runtime@^7.12.1":
version "7.23.8"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650"
@@ -1778,10 +1771,10 @@
dependencies:
regenerator-runtime "^0.14.0"
-"@babel/runtime@^7.12.13", "@babel/runtime@^7.15.4":
- version "7.16.3"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5"
- integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==
+"@babel/runtime@^7.12.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
+ version "7.15.3"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"
+ integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==
dependencies:
regenerator-runtime "^0.13.4"
@@ -1799,6 +1792,13 @@
dependencies:
regenerator-runtime "^0.13.4"
+"@babel/runtime@^7.15.4":
+ version "7.16.3"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5"
+ integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==
+ dependencies:
+ regenerator-runtime "^0.13.4"
+
"@babel/runtime@^7.16.3", "@babel/runtime@^7.23.2":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
@@ -1814,11 +1814,11 @@
regenerator-runtime "^0.14.0"
"@babel/runtime@^7.7.6":
- version "7.18.0"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.0.tgz#6d77142a19cb6088f0af662af1ada37a604d34ae"
- integrity sha512-YMQvx/6nKEaucl0MY56mwIG483xk8SDNdlUwb2Ts6FUpr7fm85DxEmsY18LXBNhcTz6tO6JwZV8w1W06v8UKeg==
+ version "7.24.1"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.1.tgz#431f9a794d173b53720e69a6464abc6f0e2a5c57"
+ integrity sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==
dependencies:
- regenerator-runtime "^0.13.4"
+ regenerator-runtime "^0.14.0"
"@babel/template@^7.14.5":
version "7.14.5"
@@ -8806,26 +8806,14 @@ he@^1.2.0:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
-history@^4.9.0:
- version "4.10.1"
- resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3"
- integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==
- dependencies:
- "@babel/runtime" "^7.1.2"
- loose-envify "^1.2.0"
- resolve-pathname "^3.0.0"
- tiny-invariant "^1.0.2"
- tiny-warning "^1.0.0"
- value-equal "^1.0.1"
-
-history@^5.3.0:
+history@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/history/-/history-5.3.0.tgz#1548abaa245ba47992f063a0783db91ef201c73b"
integrity sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==
dependencies:
"@babel/runtime" "^7.7.6"
-hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
+hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@@ -9434,11 +9422,6 @@ is-wsl@^2.2.0:
dependencies:
is-docker "^2.0.0"
-isarray@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
- integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
-
isarray@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
@@ -9964,7 +9947,7 @@ log-update@^4.0.0:
slice-ansi "^4.0.0"
wrap-ansi "^6.2.0"
-loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0:
+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -10888,13 +10871,6 @@ path-to-regexp@0.1.7:
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
-path-to-regexp@^1.7.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a"
- integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==
- dependencies:
- isarray "0.0.1"
-
path-to-regexp@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38"
@@ -11248,15 +11224,6 @@ prop-types@15.8.1, prop-types@^15.5.8, prop-types@^15.7.2, prop-types@^15.8.1:
object-assign "^4.1.1"
react-is "^16.13.1"
-prop-types@^15.6.2:
- version "15.7.2"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
- integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
- dependencies:
- loose-envify "^1.4.0"
- object-assign "^4.1.1"
- react-is "^16.8.1"
-
property-expr@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.4.tgz#37b925478e58965031bb612ec5b3260f8241e910"
@@ -11490,7 +11457,7 @@ react-is@18.1.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67"
integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==
-react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1:
+react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
@@ -11548,27 +11515,14 @@ react-remove-scroll@2.5.5:
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"
-react-router-dom-v5-compat@6.22.3:
+react-router-dom@6.22.3:
version "6.22.3"
- resolved "https://registry.yarnpkg.com/react-router-dom-v5-compat/-/react-router-dom-v5-compat-6.22.3.tgz#4889b46d060492a58c401700c987bddcc8b915f4"
- integrity sha512-icbyLKEUdMqWjehsRrQv0g/N4C33KFC2ZmnOBF7vvy1hudYSJWY4VTOjy3ey2YY+r3WtcdEH72M7IIGVHAkEtw==
+ resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.22.3.tgz#9781415667fd1361a475146c5826d9f16752a691"
+ integrity sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==
dependencies:
- history "^5.3.0"
+ "@remix-run/router" "1.15.3"
react-router "6.22.3"
-react-router-dom@5.3.4:
- version "5.3.4"
- resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.4.tgz#2ed62ffd88cae6db134445f4a0c0ae8b91d2e5e6"
- integrity sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==
- dependencies:
- "@babel/runtime" "^7.12.13"
- history "^4.9.0"
- loose-envify "^1.3.1"
- prop-types "^15.6.2"
- react-router "5.3.4"
- tiny-invariant "^1.0.2"
- tiny-warning "^1.0.0"
-
react-router-dom@6.6.1:
version "6.6.1"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.6.1.tgz#1b96ec0b2cefa7319f1251383ea5b41295ee260d"
@@ -11577,21 +11531,6 @@ react-router-dom@6.6.1:
"@remix-run/router" "1.2.1"
react-router "6.6.1"
-react-router@5.3.4:
- version "5.3.4"
- resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.4.tgz#8ca252d70fcc37841e31473c7a151cf777887bb5"
- integrity sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==
- dependencies:
- "@babel/runtime" "^7.12.13"
- history "^4.9.0"
- hoist-non-react-statics "^3.1.0"
- loose-envify "^1.3.1"
- path-to-regexp "^1.7.0"
- prop-types "^15.6.2"
- react-is "^16.6.0"
- tiny-invariant "^1.0.2"
- tiny-warning "^1.0.0"
-
react-router@6.22.3:
version "6.22.3"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.22.3.tgz#9d9142f35e08be08c736a2082db5f0c9540a885e"
@@ -11936,11 +11875,6 @@ resolve-from@^5.0.0:
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
-resolve-pathname@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd"
- integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==
-
resolve-pkg-maps@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
@@ -12880,17 +12814,12 @@ timezone-mock@1.3.6:
resolved "https://registry.yarnpkg.com/timezone-mock/-/timezone-mock-1.3.6.tgz#44e4c5aeb57e6c07ae630a05c528fc4d9aab86f4"
integrity sha512-YcloWmZfLD9Li5m2VcobkCDNVaLMx8ohAb/97l/wYS3m+0TIEK5PFNMZZfRcusc6sFjIfxu8qcJT0CNnOdpqmg==
-tiny-invariant@^1.0.2:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875"
- integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==
-
tiny-invariant@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642"
integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==
-tiny-warning@^1.0.0, tiny-warning@^1.0.2:
+tiny-warning@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
@@ -13437,11 +13366,6 @@ validate-npm-package-name@^5.0.0:
dependencies:
builtins "^5.0.0"
-value-equal@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c"
- integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==
-
vanilla-framework@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/vanilla-framework/-/vanilla-framework-4.0.0.tgz#a2fee9bd9763ebd6932b764f9d66484dc177d4cc"