diff --git a/src/PageHeader.tsx b/src/PageHeader.tsx index d6a861b04b..e7956b723a 100644 --- a/src/PageHeader.tsx +++ b/src/PageHeader.tsx @@ -14,7 +14,7 @@ import { import { HelpIcon } from "@patternfly/react-icons"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { HelpHeader, useHelp } from "./components/help-enabler/HelpHeader"; import { useAdminClient } from "./context/auth/AdminClient"; import { useRealm } from "./context/realm-context/RealmContext"; diff --git a/src/authentication/AuthenticationSection.tsx b/src/authentication/AuthenticationSection.tsx index cb33017c46..84f6442854 100644 --- a/src/authentication/AuthenticationSection.tsx +++ b/src/authentication/AuthenticationSection.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; -import { Link, useHistory } from "react-router-dom"; +import { useHistory } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Trans, useTranslation } from "react-i18next"; import { sortBy } from "lodash-es"; import { diff --git a/src/authentication/form/CreateFlow.tsx b/src/authentication/form/CreateFlow.tsx index 09710e67a4..896b89887e 100644 --- a/src/authentication/form/CreateFlow.tsx +++ b/src/authentication/form/CreateFlow.tsx @@ -1,4 +1,4 @@ -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; diff --git a/src/client-scopes/ClientScopesSection.tsx b/src/client-scopes/ClientScopesSection.tsx index 8570a2ee22..69f9a8f982 100644 --- a/src/client-scopes/ClientScopesSection.tsx +++ b/src/client-scopes/ClientScopesSection.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { AlertVariant, Button, diff --git a/src/client-scopes/details/MapperList.tsx b/src/client-scopes/details/MapperList.tsx index af9a4e2376..46b681088f 100644 --- a/src/client-scopes/details/MapperList.tsx +++ b/src/client-scopes/details/MapperList.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import type { Path } from "react-router-dom-v5-compat"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Dropdown, DropdownItem, DropdownToggle } from "@patternfly/react-core"; import { CaretDownIcon } from "@patternfly/react-icons"; diff --git a/src/client-scopes/details/MappingDetails.tsx b/src/client-scopes/details/MappingDetails.tsx index 70752ca6dd..3a2dd816e6 100644 --- a/src/client-scopes/details/MappingDetails.tsx +++ b/src/client-scopes/details/MappingDetails.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; -import { Link, useParams, useRouteMatch } from "react-router-dom"; +import { useParams, useRouteMatch } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; diff --git a/src/client-scopes/details/ScopeForm.tsx b/src/client-scopes/details/ScopeForm.tsx index 56455b6d6e..23f4ed4edc 100644 --- a/src/client-scopes/details/ScopeForm.tsx +++ b/src/client-scopes/details/ScopeForm.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; -import { Link, useParams } from "react-router-dom"; +import { useParams } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Controller, useForm, useWatch } from "react-hook-form"; import { diff --git a/src/clients/ClientsSection.tsx b/src/clients/ClientsSection.tsx index 3bd4b5dd6e..5e51fdf34e 100644 --- a/src/clients/ClientsSection.tsx +++ b/src/clients/ClientsSection.tsx @@ -13,7 +13,8 @@ import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/ import type { ClientQuery } from "@keycloak/keycloak-admin-client/lib/resources/clients"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link, useHistory } from "react-router-dom"; +import { useHistory } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useAlerts } from "../components/alert/Alerts"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { formattedLinkTableCell } from "../components/external-link/FormattedLink"; diff --git a/src/clients/advanced/RevocationPanel.tsx b/src/clients/advanced/RevocationPanel.tsx index 360d786e5d..be027d1798 100644 --- a/src/clients/advanced/RevocationPanel.tsx +++ b/src/clients/advanced/RevocationPanel.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Trans, useTranslation } from "react-i18next"; import { useFormContext } from "react-hook-form"; import { diff --git a/src/clients/authorization/AuthorizationEvaluateResourcePolicies.tsx b/src/clients/authorization/AuthorizationEvaluateResourcePolicies.tsx index f38fc2388d..dfa85f9ed5 100644 --- a/src/clients/authorization/AuthorizationEvaluateResourcePolicies.tsx +++ b/src/clients/authorization/AuthorizationEvaluateResourcePolicies.tsx @@ -11,7 +11,8 @@ import { useTranslation } from "react-i18next"; import type PolicyResultRepresentation from "@keycloak/keycloak-admin-client/lib/defs/policyResultRepresentation"; import type EvaluationResultRepresentation from "@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation"; import { DecisionEffect } from "@keycloak/keycloak-admin-client/lib/defs/policyRepresentation"; -import { Link, useParams } from "react-router-dom"; +import { useParams } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { toPermissionDetails } from "../routes/PermissionDetails"; import { toPolicyDetails } from "../routes/PolicyDetails"; import { useRealm } from "../../context/realm-context/RealmContext"; diff --git a/src/clients/authorization/DetailDescription.tsx b/src/clients/authorization/DetailDescription.tsx index 54979e2244..c8ea368ff3 100644 --- a/src/clients/authorization/DetailDescription.tsx +++ b/src/clients/authorization/DetailDescription.tsx @@ -4,7 +4,7 @@ import { DescriptionListTerm, } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Path } from "react-router-dom-v5-compat"; type DetailDescriptionProps = { diff --git a/src/clients/authorization/PermissionDetails.tsx b/src/clients/authorization/PermissionDetails.tsx index 37f3d6574e..f3dc0423f7 100644 --- a/src/clients/authorization/PermissionDetails.tsx +++ b/src/clients/authorization/PermissionDetails.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Controller, FormProvider, useForm, useWatch } from "react-hook-form"; import { diff --git a/src/clients/authorization/Permissions.tsx b/src/clients/authorization/Permissions.tsx index 2f9c30950b..15e9fa05c6 100644 --- a/src/clients/authorization/Permissions.tsx +++ b/src/clients/authorization/Permissions.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { diff --git a/src/clients/authorization/Policies.tsx b/src/clients/authorization/Policies.tsx index 8aa0e7875e..f14a8b9c91 100644 --- a/src/clients/authorization/Policies.tsx +++ b/src/clients/authorization/Policies.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { diff --git a/src/clients/authorization/ResourceDetails.tsx b/src/clients/authorization/ResourceDetails.tsx index 4465f845fa..68cdda5656 100644 --- a/src/clients/authorization/ResourceDetails.tsx +++ b/src/clients/authorization/ResourceDetails.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { Controller, FormProvider, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { diff --git a/src/clients/authorization/Resources.tsx b/src/clients/authorization/Resources.tsx index 9667e6f8ad..afb45287f2 100644 --- a/src/clients/authorization/Resources.tsx +++ b/src/clients/authorization/Resources.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Alert, diff --git a/src/clients/authorization/ScopeDetails.tsx b/src/clients/authorization/ScopeDetails.tsx index c314e9666b..9f35de7d40 100644 --- a/src/clients/authorization/ScopeDetails.tsx +++ b/src/clients/authorization/ScopeDetails.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { diff --git a/src/clients/authorization/Scopes.tsx b/src/clients/authorization/Scopes.tsx index 96889b6f63..8dbd7f8ab6 100644 --- a/src/clients/authorization/Scopes.tsx +++ b/src/clients/authorization/Scopes.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { diff --git a/src/clients/authorization/policy/PolicyDetails.tsx b/src/clients/authorization/policy/PolicyDetails.tsx index d52525501f..c53699b0f0 100644 --- a/src/clients/authorization/policy/PolicyDetails.tsx +++ b/src/clients/authorization/policy/PolicyDetails.tsx @@ -1,6 +1,6 @@ import { FunctionComponent, useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { diff --git a/src/clients/import/ImportForm.tsx b/src/clients/import/ImportForm.tsx index a148824ba2..d24a8edb90 100644 --- a/src/clients/import/ImportForm.tsx +++ b/src/clients/import/ImportForm.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; diff --git a/src/clients/initial-access/CreateInitialAccessToken.tsx b/src/clients/initial-access/CreateInitialAccessToken.tsx index 2145b43a46..3b5d0920b6 100644 --- a/src/clients/initial-access/CreateInitialAccessToken.tsx +++ b/src/clients/initial-access/CreateInitialAccessToken.tsx @@ -15,7 +15,7 @@ import { FormAccess } from "../../components/form-access/FormAccess"; import { ViewHeader } from "../../components/view-header/ViewHeader"; import { HelpItem } from "../../components/help-enabler/HelpItem"; import { TimeSelector } from "../../components/time-selector/TimeSelector"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useRealm } from "../../context/realm-context/RealmContext"; import { useAdminClient } from "../../context/auth/AdminClient"; diff --git a/src/clients/initial-access/InitialAccessTokenList.tsx b/src/clients/initial-access/InitialAccessTokenList.tsx index ac14a3c25e..124e050d29 100644 --- a/src/clients/initial-access/InitialAccessTokenList.tsx +++ b/src/clients/initial-access/InitialAccessTokenList.tsx @@ -3,7 +3,7 @@ import { wrappable } from "@patternfly/react-table"; import type ClientInitialAccessPresentation from "@keycloak/keycloak-admin-client/lib/defs/clientInitialAccessPresentation"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useAlerts } from "../../components/alert/Alerts"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; diff --git a/src/clients/scopes/ClientScopes.tsx b/src/clients/scopes/ClientScopes.tsx index cb9ae496e0..9e9eca814e 100644 --- a/src/clients/scopes/ClientScopes.tsx +++ b/src/clients/scopes/ClientScopes.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { AlertVariant, diff --git a/src/clients/service-account/ServiceAccount.tsx b/src/clients/service-account/ServiceAccount.tsx index dc36fd3cb6..5f6d35ce28 100644 --- a/src/clients/service-account/ServiceAccount.tsx +++ b/src/clients/service-account/ServiceAccount.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Trans, useTranslation } from "react-i18next"; import { AlertVariant, PageSection } from "@patternfly/react-core"; import { InfoCircleIcon } from "@patternfly/react-icons"; diff --git a/src/components/bread-crumb/GroupBreadCrumbs.tsx b/src/components/bread-crumb/GroupBreadCrumbs.tsx index 076f1771d0..9838bb956b 100644 --- a/src/components/bread-crumb/GroupBreadCrumbs.tsx +++ b/src/components/bread-crumb/GroupBreadCrumbs.tsx @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useLocation } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Breadcrumb, BreadcrumbItem } from "@patternfly/react-core"; diff --git a/src/components/bread-crumb/PageBreadCrumbs.tsx b/src/components/bread-crumb/PageBreadCrumbs.tsx index 21586250cb..97183fcc1d 100644 --- a/src/components/bread-crumb/PageBreadCrumbs.tsx +++ b/src/components/bread-crumb/PageBreadCrumbs.tsx @@ -1,5 +1,5 @@ import { isValidElement } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import useBreadcrumbs, { BreadcrumbData, BreadcrumbsRoute, diff --git a/src/components/permission-tab/PermissionTab.tsx b/src/components/permission-tab/PermissionTab.tsx index a829fd3362..a02bea9d06 100644 --- a/src/components/permission-tab/PermissionTab.tsx +++ b/src/components/permission-tab/PermissionTab.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { Trans, useTranslation } from "react-i18next"; import { diff --git a/src/events/EventsSection.tsx b/src/events/EventsSection.tsx index aac93427ac..d1e9637949 100644 --- a/src/events/EventsSection.tsx +++ b/src/events/EventsSection.tsx @@ -30,7 +30,8 @@ import { pickBy } from "lodash-es"; import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { Trans, useTranslation } from "react-i18next"; -import { Link, useHistory } from "react-router-dom"; +import { useHistory } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { ListEmptyState } from "../components/list-empty-state/ListEmptyState"; import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { ViewHeader } from "../components/view-header/ViewHeader"; diff --git a/src/events/ResourceLinks.tsx b/src/events/ResourceLinks.tsx index 85361e482f..773603c95c 100644 --- a/src/events/ResourceLinks.tsx +++ b/src/events/ResourceLinks.tsx @@ -1,5 +1,5 @@ import { ReactElement } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Tooltip } from "@patternfly/react-core"; import type AdminEventRepresentation from "@keycloak/keycloak-admin-client/lib/defs/adminEventRepresentation"; diff --git a/src/groups/GroupTable.tsx b/src/groups/GroupTable.tsx index eaefe1fac1..fd12b1802c 100644 --- a/src/groups/GroupTable.tsx +++ b/src/groups/GroupTable.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useLocation, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { cellWidth } from "@patternfly/react-table"; diff --git a/src/groups/GroupsSection.tsx b/src/groups/GroupsSection.tsx index 1db205db9e..638295d7cb 100644 --- a/src/groups/GroupsSection.tsx +++ b/src/groups/GroupsSection.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useLocation, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { diff --git a/src/groups/Members.tsx b/src/groups/Members.tsx index 9157a862d7..f025737b21 100644 --- a/src/groups/Members.tsx +++ b/src/groups/Members.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useLocation } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { uniqBy } from "lodash-es"; diff --git a/src/groups/SearchGroups.tsx b/src/groups/SearchGroups.tsx index 19dcda6499..5d8b3638cc 100644 --- a/src/groups/SearchGroups.tsx +++ b/src/groups/SearchGroups.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Button, diff --git a/src/identity-providers/IdentityProvidersSection.tsx b/src/identity-providers/IdentityProvidersSection.tsx index e642ba6e23..bd101ede40 100644 --- a/src/identity-providers/IdentityProvidersSection.tsx +++ b/src/identity-providers/IdentityProvidersSection.tsx @@ -1,5 +1,5 @@ import { Fragment, useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { sortBy, groupBy } from "lodash-es"; diff --git a/src/identity-providers/add/AddIdentityProvider.tsx b/src/identity-providers/add/AddIdentityProvider.tsx index 6f97e57a9e..092b878860 100644 --- a/src/identity-providers/add/AddIdentityProvider.tsx +++ b/src/identity-providers/add/AddIdentityProvider.tsx @@ -1,5 +1,5 @@ -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { diff --git a/src/identity-providers/add/AddMapper.tsx b/src/identity-providers/add/AddMapper.tsx index d09c700a97..58b4e2cf01 100644 --- a/src/identity-providers/add/AddMapper.tsx +++ b/src/identity-providers/add/AddMapper.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { diff --git a/src/identity-providers/add/AddOpenIdConnect.tsx b/src/identity-providers/add/AddOpenIdConnect.tsx index 931dfbd8dd..30507f388e 100644 --- a/src/identity-providers/add/AddOpenIdConnect.tsx +++ b/src/identity-providers/add/AddOpenIdConnect.tsx @@ -1,5 +1,5 @@ -import { Link, useRouteMatch } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useRouteMatch } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { diff --git a/src/identity-providers/add/AddSamlConnect.tsx b/src/identity-providers/add/AddSamlConnect.tsx index c3f2792909..a3885c0339 100644 --- a/src/identity-providers/add/AddSamlConnect.tsx +++ b/src/identity-providers/add/AddSamlConnect.tsx @@ -1,4 +1,4 @@ -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; diff --git a/src/identity-providers/add/DetailSettings.tsx b/src/identity-providers/add/DetailSettings.tsx index 2829161b7c..5053b20ee7 100644 --- a/src/identity-providers/add/DetailSettings.tsx +++ b/src/identity-providers/add/DetailSettings.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { Controller, diff --git a/src/realm-roles/RolesList.tsx b/src/realm-roles/RolesList.tsx index 62dbd9374b..bed1be153f 100644 --- a/src/realm-roles/RolesList.tsx +++ b/src/realm-roles/RolesList.tsx @@ -1,6 +1,6 @@ import { FunctionComponent, useState } from "react"; -import { Link, useRouteMatch } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useRouteMatch } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { AlertVariant, Button, ButtonVariant } from "@patternfly/react-core"; diff --git a/src/realm-settings/ClientProfileForm.tsx b/src/realm-settings/ClientProfileForm.tsx index f1941b4f70..b557c65318 100644 --- a/src/realm-settings/ClientProfileForm.tsx +++ b/src/realm-settings/ClientProfileForm.tsx @@ -23,8 +23,8 @@ import { useTranslation } from "react-i18next"; import { useForm } from "react-hook-form"; import { FormAccess } from "../components/form-access/FormAccess"; import { ViewHeader } from "../components/view-header/ViewHeader"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useAlerts } from "../components/alert/Alerts"; import { useAdminClient, useFetch } from "../context/auth/AdminClient"; import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation"; diff --git a/src/realm-settings/DefaultGroupsTab.tsx b/src/realm-settings/DefaultGroupsTab.tsx index d717685625..44d55a45ea 100644 --- a/src/realm-settings/DefaultGroupsTab.tsx +++ b/src/realm-settings/DefaultGroupsTab.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { Trans, useTranslation } from "react-i18next"; import { AlertVariant, diff --git a/src/realm-settings/ExecutorForm.tsx b/src/realm-settings/ExecutorForm.tsx index 7b04b23b51..300eb1abd3 100644 --- a/src/realm-settings/ExecutorForm.tsx +++ b/src/realm-settings/ExecutorForm.tsx @@ -16,8 +16,8 @@ import { useAlerts } from "../components/alert/Alerts"; import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { Controller, FormProvider, useForm } from "react-hook-form"; import { HelpItem } from "../components/help-enabler/HelpItem"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useAdminClient, useFetch } from "../context/auth/AdminClient"; import type ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation"; import type { ConfigPropertyRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation"; diff --git a/src/realm-settings/NewAttributeSettings.tsx b/src/realm-settings/NewAttributeSettings.tsx index 10c9f93aee..47dc5436ac 100644 --- a/src/realm-settings/NewAttributeSettings.tsx +++ b/src/realm-settings/NewAttributeSettings.tsx @@ -8,8 +8,8 @@ import { } from "@patternfly/react-core"; import { FormProvider, useForm, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { ScrollForm } from "../components/scroll-form/ScrollForm"; import type UserProfileConfig from "@keycloak/keycloak-admin-client/lib/defs/userProfileConfig"; import { AttributeGeneralSettings } from "./user-profile/attribute/AttributeGeneralSettings"; diff --git a/src/realm-settings/NewClientPolicyForm.tsx b/src/realm-settings/NewClientPolicyForm.tsx index 3d3d6c8e00..43afb6dc80 100644 --- a/src/realm-settings/NewClientPolicyForm.tsx +++ b/src/realm-settings/NewClientPolicyForm.tsx @@ -23,8 +23,8 @@ import { useTranslation } from "react-i18next"; import { Controller, useForm } from "react-hook-form"; import { FormAccess } from "../components/form-access/FormAccess"; import { ViewHeader } from "../components/view-header/ViewHeader"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useRealm } from "../context/realm-context/RealmContext"; import { useAlerts } from "../components/alert/Alerts"; import { useAdminClient, useFetch } from "../context/auth/AdminClient"; diff --git a/src/realm-settings/PoliciesTab.tsx b/src/realm-settings/PoliciesTab.tsx index 99fa2f5736..3ceddbe1f8 100644 --- a/src/realm-settings/PoliciesTab.tsx +++ b/src/realm-settings/PoliciesTab.tsx @@ -19,7 +19,7 @@ import { useTranslation } from "react-i18next"; import { useAdminClient, useFetch } from "../context/auth/AdminClient"; import { prettyPrintJSON } from "../util"; import { CodeEditor, Language } from "@patternfly/react-code-editor"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import type ClientPolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientPolicyRepresentation"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; diff --git a/src/realm-settings/ProfilesTab.tsx b/src/realm-settings/ProfilesTab.tsx index ff82da8be5..0214cbbf68 100644 --- a/src/realm-settings/ProfilesTab.tsx +++ b/src/realm-settings/ProfilesTab.tsx @@ -20,7 +20,7 @@ import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { useRealm } from "../context/realm-context/RealmContext"; import { useAlerts } from "../components/alert/Alerts"; import { prettyPrintJSON } from "../util"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { toAddClientProfile } from "./routes/AddClientProfile"; import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation"; import { toClientProfile } from "./routes/ClientProfile"; diff --git a/src/realm-settings/keys/KeysProvidersTab.tsx b/src/realm-settings/keys/KeysProvidersTab.tsx index 8753e3caae..d69a4d42ba 100644 --- a/src/realm-settings/keys/KeysProvidersTab.tsx +++ b/src/realm-settings/keys/KeysProvidersTab.tsx @@ -26,7 +26,8 @@ import { useAdminClient } from "../../context/auth/AdminClient"; import { useAlerts } from "../../components/alert/Alerts"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { useRealm } from "../../context/realm-context/RealmContext"; -import { Link, useRouteMatch } from "react-router-dom"; +import { useRouteMatch } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { KEY_PROVIDER_TYPE } from "../../util"; import { DraggableTable } from "../../authentication/components/DraggableTable"; import { KeyProviderModal } from "./key-providers/KeyProviderModal"; diff --git a/src/realm-settings/user-profile/AttributesGroupForm.tsx b/src/realm-settings/user-profile/AttributesGroupForm.tsx index 1f5ae9897d..0b69f53eca 100644 --- a/src/realm-settings/user-profile/AttributesGroupForm.tsx +++ b/src/realm-settings/user-profile/AttributesGroupForm.tsx @@ -10,8 +10,8 @@ import { import { useEffect, useMemo } from "react"; import { FormProvider, SubmitHandler, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { KeyValueInput } from "../../components/key-value-form/KeyValueInput"; import { FormAccess } from "../../components/form-access/FormAccess"; import { HelpItem } from "../../components/help-enabler/HelpItem"; diff --git a/src/realm-settings/user-profile/AttributesGroupTab.tsx b/src/realm-settings/user-profile/AttributesGroupTab.tsx index 28d6f3ba50..2c7c21e0aa 100644 --- a/src/realm-settings/user-profile/AttributesGroupTab.tsx +++ b/src/realm-settings/user-profile/AttributesGroupTab.tsx @@ -7,7 +7,7 @@ import { } from "@patternfly/react-core"; import { useEffect, useState } from "react"; import { Trans, useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog"; import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState"; diff --git a/src/realm-settings/user-profile/AttributesTab.tsx b/src/realm-settings/user-profile/AttributesTab.tsx index 0ff2cd234a..d0197ccdf7 100644 --- a/src/realm-settings/user-profile/AttributesTab.tsx +++ b/src/realm-settings/user-profile/AttributesTab.tsx @@ -15,7 +15,7 @@ import { FilterIcon } from "@patternfly/react-icons"; import { KeycloakSpinner } from "../../components/keycloak-spinner/KeycloakSpinner"; import { DraggableTable } from "../../authentication/components/DraggableTable"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useNavigate } from "react-router-dom-v5-compat"; import { toAddAttribute } from "../routes/AddAttribute"; import { useRealm } from "../../context/realm-context/RealmContext"; diff --git a/src/sessions/SessionsTable.tsx b/src/sessions/SessionsTable.tsx index c2f79a3488..52e64ec90e 100644 --- a/src/sessions/SessionsTable.tsx +++ b/src/sessions/SessionsTable.tsx @@ -9,7 +9,7 @@ import { import { CubesIcon } from "@patternfly/react-icons"; import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { toClient } from "../clients/routes/Client"; import { useAlerts } from "../components/alert/Alerts"; diff --git a/src/user-federation/custom/CustomProviderSettings.tsx b/src/user-federation/custom/CustomProviderSettings.tsx index 4402f14509..430c3b46bf 100644 --- a/src/user-federation/custom/CustomProviderSettings.tsx +++ b/src/user-federation/custom/CustomProviderSettings.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { diff --git a/src/user-federation/ldap/mappers/LdapMapperList.tsx b/src/user-federation/ldap/mappers/LdapMapperList.tsx index 2344811b57..da9486f8c4 100644 --- a/src/user-federation/ldap/mappers/LdapMapperList.tsx +++ b/src/user-federation/ldap/mappers/LdapMapperList.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Link, useParams, useRouteMatch } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useParams, useRouteMatch } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useTranslation } from "react-i18next"; import { AlertVariant, diff --git a/src/user/UserIdentityProviderLinks.tsx b/src/user/UserIdentityProviderLinks.tsx index dbbad1b8a2..bc135da911 100644 --- a/src/user/UserIdentityProviderLinks.tsx +++ b/src/user/UserIdentityProviderLinks.tsx @@ -12,7 +12,8 @@ import { import { FormPanel } from "../components/scroll-form/FormPanel"; import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable"; import { cellWidth } from "@patternfly/react-table"; -import { Link, useParams } from "react-router-dom"; +import { useParams } from "react-router-dom"; +import { Link } from "react-router-dom-v5-compat"; import { useAdminClient } from "../context/auth/AdminClient"; import { emptyFormatter, upperCaseFormatter } from "../util"; import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation"; diff --git a/src/user/UsersSection.tsx b/src/user/UsersSection.tsx index e1bf572555..5c1c2e27ea 100644 --- a/src/user/UsersSection.tsx +++ b/src/user/UsersSection.tsx @@ -31,8 +31,8 @@ import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/de import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link, useHistory } from "react-router-dom"; -import { useNavigate } from "react-router-dom-v5-compat"; +import { useHistory } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom-v5-compat"; import { useAlerts } from "../components/alert/Alerts"; import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog"; import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";