Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove react-router-dom-v5-compat imports #5372

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions src/app/Routes.tsx
Original file line number Diff line number Diff line change
@@ -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 { Redirect, Route, Routes as ReactRouterRoutes } from "react-router-dom";

Check failure on line 3 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

'"react-router-dom"' has no exported member named 'Routes'. Did you mean 'Route'?

import ErrorBoundary from "@/app/base/components/ErrorBoundary";
import urls from "@/app/base/urls";
Expand Down Expand Up @@ -41,9 +40,9 @@

const Routes = (): JSX.Element => (
<ReactRouterRoutes>
<Route element={<Redirect to={urls.machines.index} />} path={urls.index} />

Check failure on line 43 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<Route
element={

Check failure on line 45 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<Machines />
</ErrorBoundary>
Expand All @@ -51,7 +50,7 @@
path={urls.machines.index}
/>
<Route
element={

Check failure on line 53 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<ZoneDetails />
</ErrorBoundary>
Expand All @@ -59,7 +58,7 @@
path={`${urls.zones.details(null)}/*`}
/>
<Route
element={

Check failure on line 61 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<ZonesList />
</ErrorBoundary>
Expand All @@ -67,7 +66,7 @@
path={`${urls.zones.index}/*`}
/>
<Route
element={

Check failure on line 69 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<NetworkDiscovery />
</ErrorBoundary>
Expand All @@ -75,15 +74,15 @@
path={`${urls.networkDiscovery.index}/*`}
/>
<Route
element={<Redirect to={urls.networkDiscovery.index} />}

Check failure on line 77 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
path={urls.networkDiscovery.legacyIndex}
/>
<Route
element={<Redirect to={urls.networkDiscovery.configuration} />}

Check failure on line 81 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
path={urls.networkDiscovery.legacyConfiguration}
/>
<Route
element={

Check failure on line 85 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<DeviceList />
</ErrorBoundary>
Expand All @@ -91,7 +90,7 @@
path={`${urls.devices.index}/*`}
/>
<Route
element={

Check failure on line 93 in src/app/Routes.tsx

View workflow job for this annotation

GitHub Actions / Lint

No overload matches this call.
<ErrorBoundary>
<DeviceDetails />
</ErrorBoundary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { MouseEvent, ReactNode } from "react";

import { Navigation } from "@canonical/maas-react-components";
import classNames from "classnames";
import { Link } from "react-router-dom-v5-compat";
import { Link } from "react-router-dom";

import type { SideNavigationProps } from "../AppSideNavigation";
import type { NavItem } from "../types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { createMemoryHistory } from "history";
import { Provider } from "react-redux";
import { BrowserRouter, Router } from "react-router-dom";
import { CompatRouter, Route, Routes } from "react-router-dom-v5-compat";
import {
BrowserRouter,
Router,
CompatRouter,
Route,
Routes,
} from "react-router-dom";
import configureStore from "redux-mock-store";

import AppSideNavigation from "./AppSideNavigation";
Expand All @@ -21,8 +26,8 @@
} from "@/testing/utils";

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,
Expand Down Expand Up @@ -102,7 +107,7 @@
render(
<Provider store={store}>
<BrowserRouter>
<CompatRouter>

Check failure on line 110 in src/app/base/components/AppSideNavigation/AppSideNavigation.test.tsx

View workflow job for this annotation

GitHub Actions / Test

src/app/base/components/AppSideNavigation/AppSideNavigation.test.tsx > GlobalSideNav > can dispatch an action to log out

Error: [vitest] No "CompatRouter" export is defined on the "react-router-dom" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock("react-router-dom", async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ src/app/base/components/AppSideNavigation/AppSideNavigation.test.tsx:110:12
<AppSideNavigation />
</CompatRouter>
</BrowserRouter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/AppSideNavigation/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { matchPath } from "react-router-dom-v5-compat";
import { matchPath } from "react-router-dom";

import type { NavItem } from "./types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";

Check warning on line 2 in src/app/base/components/ControllerLink/ControllerLink.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

Check warning on line 3 in src/app/base/components/ControllerLink/ControllerLink.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import configureStore from "redux-mock-store";

import ControllerLink, { Labels } from "./ControllerLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/ControllerLink/ControllerLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/DHCPTable/DHCPTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";

Check warning on line 2 in src/app/base/components/DHCPTable/DHCPTable.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

Check warning on line 3 in src/app/base/components/DHCPTable/DHCPTable.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import configureStore from "redux-mock-store";

import DHCPTable, { TestIds } from "./DHCPTable";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/DHCPTable/DHCPTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
3 changes: 1 addition & 2 deletions src/app/base/components/DeviceLink/DeviceLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { MemoryRouter, CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import DeviceLink, { Labels } from "./DeviceLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/DeviceLink/DeviceLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/DhcpForm/DhcpForm.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";

Check warning on line 2 in src/app/base/components/DhcpForm/DhcpForm.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

Check warning on line 3 in src/app/base/components/DhcpForm/DhcpForm.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import configureStore from "redux-mock-store";

import { Labels as FieldLabels } from "../DhcpFormFields";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as reduxToolkit from "@reduxjs/toolkit";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";

Check warning on line 3 in src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

Check warning on line 4 in src/app/base/components/DhcpFormFields/DhcpFormFields.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import configureStore from "redux-mock-store";

import { Labels } from "./DhcpFormFields";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/FabricLink/FabricLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";

Check warning on line 2 in src/app/base/components/FabricLink/FabricLink.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

Check warning on line 3 in src/app/base/components/FabricLink/FabricLink.test.tsx

View workflow job for this annotation

GitHub Actions / Lint

'/home/runner/work/maas-ui/maas-ui/node_modules/react-router-dom/esm/react-router-dom.js' imported multiple times
import configureStore from "redux-mock-store";

import FabricLink, { Labels } from "./FabricLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/FabricLink/FabricLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/FormikForm/FormikForm.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import FormikForm from "./FormikForm";
Expand Down
Original file line number Diff line number Diff line change
@@ -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 { MemoryRouter, CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";
import * as Yup from "yup";

Expand All @@ -22,8 +21,8 @@ import {

const mockStore = configureStore<RootState>();
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/MachineLink/MachineLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import MachineLink, { Labels } from "./MachineLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/MachineLink/MachineLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import ModelNotFound from "./ModelNotFound";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/ModelNotFound/ModelNotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "react-router-dom-v5-compat";
import { Link } from "react-router-dom";

import PageContent from "../PageContent";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Formik } from "formik";
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import NodeConfigurationFields, { Label } from "./NodeConfigurationFields";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/PageContent/PageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions src/app/base/components/SSHKeyList/SSHKeyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/SpaceLink/SpaceLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import SpaceLink from "./SpaceLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/SpaceLink/SpaceLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/SubnetLink/SubnetLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import SubnetLink from "./SubnetLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/SubnetLink/SubnetLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/TableActions/TableActions.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/TagLinks/TagLinks.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";

import TagLinks from "./TagLinks";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/TagLinks/TagLinks.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/VLANLink/VLANLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import VLANLink from "./VLANLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/VLANLink/VLANLink.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import MachinesHeader from "./MachinesHeader";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/node/NodeDevices/NodeDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/node/NodeLink/NodeLink.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Provider } from "react-redux";
import { MemoryRouter } from "react-router-dom";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter } from "react-router-dom";
import configureStore from "redux-mock-store";

import NodeLink from "./NodeLink";
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/node/NodeLogs/NodeLogs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Tabs } from "@canonical/react-components";
import { Route, useLocation } from "react-router-dom";
import { Link } from "react-router-dom-v5-compat";
import { Link } from "react-router-dom";

import DownloadMenu from "./DownloadMenu";
import EventLogs from "./EventLogs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Loading
Loading