Upgrade react-router-dom
to the latest version (#31851)
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> Signed-off-by: Jon Koops <jonkoops@gmail.com> Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com> Co-authored-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
80d235fffb
commit
5cb19c3449
4 changed files with 28 additions and 31 deletions
|
@ -37,7 +37,7 @@
|
|||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "^7.52.2",
|
||||
"react-i18next": "^15.0.1",
|
||||
"react-router-dom": "^6.24.1"
|
||||
"react-router-dom": "^6.26.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@keycloak/keycloak-admin-client": "workspace:*",
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
"react-dropzone": "^14.2.3",
|
||||
"react-hook-form": "^7.52.2",
|
||||
"react-i18next": "^15.0.1",
|
||||
"react-router-dom": "^6.24.1",
|
||||
"react-router-dom": "^6.26.0",
|
||||
"reactflow": "^11.11.4",
|
||||
"use-react-router-breadcrumbs": "^4.0.1"
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
useEnvironment,
|
||||
useRequiredContext,
|
||||
} from "@keycloak/keycloak-ui-shared";
|
||||
import { PropsWithChildren, useEffect, useMemo, useState } from "react";
|
||||
import { PropsWithChildren, useEffect, useState } from "react";
|
||||
import { useMatch } from "react-router-dom";
|
||||
import { useAdminClient } from "../../admin-client";
|
||||
import { DashboardRouteWithRealm } from "../../dashboard/routes/Dashboard";
|
||||
|
@ -35,18 +35,15 @@ export const RealmContextProvider = ({ children }: PropsWithChildren) => {
|
|||
end: false,
|
||||
});
|
||||
|
||||
const realmParam = routeMatch?.params.realm;
|
||||
const realm = useMemo(
|
||||
() => decodeURIComponent(realmParam ?? environment.realm),
|
||||
[realmParam],
|
||||
);
|
||||
const realm = routeMatch?.params.realm ?? environment.realm;
|
||||
|
||||
// Configure admin client to use selected realm when it changes.
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
adminClient.setConfig({ realmName: realm });
|
||||
await i18n.loadNamespaces(realm);
|
||||
i18n.setDefaultNamespace(realm);
|
||||
const namespace = encodeURIComponent(realm);
|
||||
await i18n.loadNamespaces(namespace);
|
||||
i18n.setDefaultNamespace(namespace);
|
||||
})();
|
||||
}, [realm]);
|
||||
useFetch(
|
||||
|
|
|
@ -111,8 +111,8 @@ importers:
|
|||
specifier: ^15.0.1
|
||||
version: 15.0.1(i18next@23.12.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-router-dom:
|
||||
specifier: ^6.24.1
|
||||
version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
specifier: ^6.26.0
|
||||
version: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
devDependencies:
|
||||
'@keycloak/keycloak-admin-client':
|
||||
specifier: workspace:*
|
||||
|
@ -220,14 +220,14 @@ importers:
|
|||
specifier: ^15.0.1
|
||||
version: 15.0.1(i18next@23.12.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-router-dom:
|
||||
specifier: ^6.24.1
|
||||
version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
specifier: ^6.26.0
|
||||
version: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
reactflow:
|
||||
specifier: ^11.11.4
|
||||
version: 11.11.4(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
use-react-router-breadcrumbs:
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1(react-router-dom@6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
version: 4.0.1(react-router-dom@6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
devDependencies:
|
||||
'@4tw/cypress-drag-drop':
|
||||
specifier: ^2.2.5
|
||||
|
@ -1270,8 +1270,8 @@ packages:
|
|||
react: '>=17'
|
||||
react-dom: '>=17'
|
||||
|
||||
'@remix-run/router@1.17.1':
|
||||
resolution: {integrity: sha512-mCOMec4BKd6BRGBZeSnGiIgwsbLGp3yhVqAD8H+PxiRNEHgDpZb8J1TnrSDlg97t0ySKMQJTHCWBCmBpSmkF6Q==}
|
||||
'@remix-run/router@1.19.0':
|
||||
resolution: {integrity: sha512-zDICCLKEwbVYTS6TjYaWtHXxkdoUvD/QXvyVZjGCsWz5vyH7aFeONlPffPdW+Y/t6KT0MgXb2Mfjun9YpWN1dA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
||||
'@rollup/plugin-commonjs@26.0.1':
|
||||
|
@ -4181,15 +4181,15 @@ packages:
|
|||
react-is@17.0.2:
|
||||
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
|
||||
|
||||
react-router-dom@6.24.1:
|
||||
resolution: {integrity: sha512-U19KtXqooqw967Vw0Qcn5cOvrX5Ejo9ORmOtJMzYWtCT4/WOfFLIZGGsVLxcd9UkBO0mSTZtXqhZBsWlHr7+Sg==}
|
||||
react-router-dom@6.26.0:
|
||||
resolution: {integrity: sha512-RRGUIiDtLrkX3uYcFiCIxKFWMcWQGMojpYZfcstc63A1+sSnVgILGIm9gNUA6na3Fm1QuPGSBQH2EMbAZOnMsQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
react: '>=16.8'
|
||||
react-dom: '>=16.8'
|
||||
|
||||
react-router@6.24.1:
|
||||
resolution: {integrity: sha512-PTXFXGK2pyXpHzVo3rR9H7ip4lSPZZc0bHG5CARmj65fTT6qG7sTngmb6lcYu1gf3y/8KxORoy9yn59pGpCnpg==}
|
||||
react-router@6.26.0:
|
||||
resolution: {integrity: sha512-wVQq0/iFYd3iZ9H2l3N3k4PL8EEHcb0XlU2Na8nEwmiXgIUElEH6gaJDtUQxJ+JFzmIXaQjfdpcGWaM6IoQGxg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
react: '>=16.8'
|
||||
|
@ -5668,9 +5668,9 @@ snapshots:
|
|||
react-dropzone: 14.2.3(react@18.3.1)
|
||||
react-hook-form: 7.52.2(react@18.3.1)
|
||||
react-i18next: 15.0.1(i18next@23.12.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-router-dom: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-router-dom: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
reactflow: 11.11.4(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
use-react-router-breadcrumbs: 4.0.1(react-router-dom@6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
use-react-router-breadcrumbs: 4.0.1(react-router-dom@6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
transitivePeerDependencies:
|
||||
- '@types/react'
|
||||
- encoding
|
||||
|
@ -5942,7 +5942,7 @@ snapshots:
|
|||
- '@types/react'
|
||||
- immer
|
||||
|
||||
'@remix-run/router@1.17.1': {}
|
||||
'@remix-run/router@1.19.0': {}
|
||||
|
||||
'@rollup/plugin-commonjs@26.0.1(rollup@4.20.0)':
|
||||
dependencies:
|
||||
|
@ -9063,16 +9063,16 @@ snapshots:
|
|||
|
||||
react-is@17.0.2: {}
|
||||
|
||||
react-router-dom@6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
react-router-dom@6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
'@remix-run/router': 1.17.1
|
||||
'@remix-run/router': 1.19.0
|
||||
react: 18.3.1
|
||||
react-dom: 18.3.1(react@18.3.1)
|
||||
react-router: 6.24.1(react@18.3.1)
|
||||
react-router: 6.26.0(react@18.3.1)
|
||||
|
||||
react-router@6.24.1(react@18.3.1):
|
||||
react-router@6.26.0(react@18.3.1):
|
||||
dependencies:
|
||||
'@remix-run/router': 1.17.1
|
||||
'@remix-run/router': 1.19.0
|
||||
react: 18.3.1
|
||||
|
||||
react@18.3.1:
|
||||
|
@ -9756,10 +9756,10 @@ snapshots:
|
|||
|
||||
url-template@3.1.1: {}
|
||||
|
||||
use-react-router-breadcrumbs@4.0.1(react-router-dom@6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
||||
use-react-router-breadcrumbs@4.0.1(react-router-dom@6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
react: 18.3.1
|
||||
react-router-dom: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-router-dom: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
|
||||
use-sync-external-store@1.2.0(react@18.3.1):
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue