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:
dependabot[bot] 2024-08-15 16:52:58 +02:00 committed by GitHub
parent 80d235fffb
commit 5cb19c3449
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 31 deletions

View file

@ -37,7 +37,7 @@
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-hook-form": "^7.52.2", "react-hook-form": "^7.52.2",
"react-i18next": "^15.0.1", "react-i18next": "^15.0.1",
"react-router-dom": "^6.24.1" "react-router-dom": "^6.26.0"
}, },
"devDependencies": { "devDependencies": {
"@keycloak/keycloak-admin-client": "workspace:*", "@keycloak/keycloak-admin-client": "workspace:*",

View file

@ -100,7 +100,7 @@
"react-dropzone": "^14.2.3", "react-dropzone": "^14.2.3",
"react-hook-form": "^7.52.2", "react-hook-form": "^7.52.2",
"react-i18next": "^15.0.1", "react-i18next": "^15.0.1",
"react-router-dom": "^6.24.1", "react-router-dom": "^6.26.0",
"reactflow": "^11.11.4", "reactflow": "^11.11.4",
"use-react-router-breadcrumbs": "^4.0.1" "use-react-router-breadcrumbs": "^4.0.1"
}, },

View file

@ -4,7 +4,7 @@ import {
useEnvironment, useEnvironment,
useRequiredContext, useRequiredContext,
} from "@keycloak/keycloak-ui-shared"; } 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 { useMatch } from "react-router-dom";
import { useAdminClient } from "../../admin-client"; import { useAdminClient } from "../../admin-client";
import { DashboardRouteWithRealm } from "../../dashboard/routes/Dashboard"; import { DashboardRouteWithRealm } from "../../dashboard/routes/Dashboard";
@ -35,18 +35,15 @@ export const RealmContextProvider = ({ children }: PropsWithChildren) => {
end: false, end: false,
}); });
const realmParam = routeMatch?.params.realm; const realm = routeMatch?.params.realm ?? environment.realm;
const realm = useMemo(
() => decodeURIComponent(realmParam ?? environment.realm),
[realmParam],
);
// Configure admin client to use selected realm when it changes. // Configure admin client to use selected realm when it changes.
useEffect(() => { useEffect(() => {
(async () => { (async () => {
adminClient.setConfig({ realmName: realm }); adminClient.setConfig({ realmName: realm });
await i18n.loadNamespaces(realm); const namespace = encodeURIComponent(realm);
i18n.setDefaultNamespace(realm); await i18n.loadNamespaces(namespace);
i18n.setDefaultNamespace(namespace);
})(); })();
}, [realm]); }, [realm]);
useFetch( useFetch(

View file

@ -111,8 +111,8 @@ importers:
specifier: ^15.0.1 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) version: 15.0.1(i18next@23.12.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-router-dom: react-router-dom:
specifier: ^6.24.1 specifier: ^6.26.0
version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) version: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
devDependencies: devDependencies:
'@keycloak/keycloak-admin-client': '@keycloak/keycloak-admin-client':
specifier: workspace:* specifier: workspace:*
@ -220,14 +220,14 @@ importers:
specifier: ^15.0.1 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) version: 15.0.1(i18next@23.12.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-router-dom: react-router-dom:
specifier: ^6.24.1 specifier: ^6.26.0
version: 6.24.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) version: 6.26.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
reactflow: reactflow:
specifier: ^11.11.4 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) 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: use-react-router-breadcrumbs:
specifier: ^4.0.1 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: devDependencies:
'@4tw/cypress-drag-drop': '@4tw/cypress-drag-drop':
specifier: ^2.2.5 specifier: ^2.2.5
@ -1270,8 +1270,8 @@ packages:
react: '>=17' react: '>=17'
react-dom: '>=17' react-dom: '>=17'
'@remix-run/router@1.17.1': '@remix-run/router@1.19.0':
resolution: {integrity: sha512-mCOMec4BKd6BRGBZeSnGiIgwsbLGp3yhVqAD8H+PxiRNEHgDpZb8J1TnrSDlg97t0ySKMQJTHCWBCmBpSmkF6Q==} resolution: {integrity: sha512-zDICCLKEwbVYTS6TjYaWtHXxkdoUvD/QXvyVZjGCsWz5vyH7aFeONlPffPdW+Y/t6KT0MgXb2Mfjun9YpWN1dA==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
'@rollup/plugin-commonjs@26.0.1': '@rollup/plugin-commonjs@26.0.1':
@ -4181,15 +4181,15 @@ packages:
react-is@17.0.2: react-is@17.0.2:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
react-router-dom@6.24.1: react-router-dom@6.26.0:
resolution: {integrity: sha512-U19KtXqooqw967Vw0Qcn5cOvrX5Ejo9ORmOtJMzYWtCT4/WOfFLIZGGsVLxcd9UkBO0mSTZtXqhZBsWlHr7+Sg==} resolution: {integrity: sha512-RRGUIiDtLrkX3uYcFiCIxKFWMcWQGMojpYZfcstc63A1+sSnVgILGIm9gNUA6na3Fm1QuPGSBQH2EMbAZOnMsQ==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
peerDependencies: peerDependencies:
react: '>=16.8' react: '>=16.8'
react-dom: '>=16.8' react-dom: '>=16.8'
react-router@6.24.1: react-router@6.26.0:
resolution: {integrity: sha512-PTXFXGK2pyXpHzVo3rR9H7ip4lSPZZc0bHG5CARmj65fTT6qG7sTngmb6lcYu1gf3y/8KxORoy9yn59pGpCnpg==} resolution: {integrity: sha512-wVQq0/iFYd3iZ9H2l3N3k4PL8EEHcb0XlU2Na8nEwmiXgIUElEH6gaJDtUQxJ+JFzmIXaQjfdpcGWaM6IoQGxg==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
peerDependencies: peerDependencies:
react: '>=16.8' react: '>=16.8'
@ -5668,9 +5668,9 @@ snapshots:
react-dropzone: 14.2.3(react@18.3.1) react-dropzone: 14.2.3(react@18.3.1)
react-hook-form: 7.52.2(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-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) 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: transitivePeerDependencies:
- '@types/react' - '@types/react'
- encoding - encoding
@ -5942,7 +5942,7 @@ snapshots:
- '@types/react' - '@types/react'
- immer - immer
'@remix-run/router@1.17.1': {} '@remix-run/router@1.19.0': {}
'@rollup/plugin-commonjs@26.0.1(rollup@4.20.0)': '@rollup/plugin-commonjs@26.0.1(rollup@4.20.0)':
dependencies: dependencies:
@ -9063,16 +9063,16 @@ snapshots:
react-is@17.0.2: {} 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: dependencies:
'@remix-run/router': 1.17.1 '@remix-run/router': 1.19.0
react: 18.3.1 react: 18.3.1
react-dom: 18.3.1(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: dependencies:
'@remix-run/router': 1.17.1 '@remix-run/router': 1.19.0
react: 18.3.1 react: 18.3.1
react@18.3.1: react@18.3.1:
@ -9756,10 +9756,10 @@ snapshots:
url-template@3.1.1: {} 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: dependencies:
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)
use-sync-external-store@1.2.0(react@18.3.1): use-sync-external-store@1.2.0(react@18.3.1):
dependencies: dependencies: