8000 Update react router dependency by stianst · Pull Request #51764 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/apps/account-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"react-dom": "^18.3.1",
"react-hook-form": "^7.70.0",
"react-i18next": "^16.5.1",
"react-router-dom": "^6.30.4"
"react-router-dom": "^7.18.2"
},
"devDependencies": {
"@keycloak/keycloak-admin-client": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion js/apps/account-ui/src/root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function CatchAllRedirect() {
addAlert(t("pageNotFound"), AlertVariant.warning);
}, [addAlert, t]);

return <Navigate to="." replace />;
return <Navigate to=".." replace />;
}

export const Root = () => {
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"react-dom": "^18.3.1",
"react-hook-form": "^7.70.0",
"react-i18next": "^16.5.1",
"react-router-dom": "^6.30.4",
"react-router-dom": "^7.18.2",
"reactflow": "^11.11.4",
"yaml": "^2.8.3"
},
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/PageNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const PageNav = () => {
};

const SelectedItem) => {
navigate(item.to);
void navigate(item.to);
item.event.preventDefault();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const DuplicateFlowModal = ({
);
}
addAlert(t("copyFlowSuccess"), AlertVariant.success);
navigate(
void navigate(
toFlow({
realm,
id: newFlow.id!,
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/authentication/FlowDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default function FlowDetails() {
await adminClient.authenticationManagement.deleteFlow({
flowId: flow!.id!,
});
navigate(toAuthentication({ realm }));
void navigate(toAuthentication({ realm }));
addAlert(t("deleteFlowSuccess"), AlertVariant.success);
} catch (error) {
addError("deleteFlowError", error);
Expand Down Expand Up @@ -318,7 +318,7 @@ export default function FlowDetails() {
flowAlias={flow?.alias!}
=> {
toggleBindFlow();
navigate(
void navigate(
toFlow({
realm,
id: id!,
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/authentication/form/CreateFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function CreateFlow() {
const { id } =
await adminClient.authenticationManagement.createFlow(flow);
addAlert(t("flowCreatedSuccess"), AlertVariant.success);
navigate(
void navigate(
toFlow({
realm,
id: id!,
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/client-scopes/CreateClientScope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function CreateClientScope() {

addAlert(t("createClientScopeSuccess"), AlertVariant.success);

navigate(
void navigate(
toClientScope({
realm,
id: scope.id!,
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/client-scopes/EditClientScope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function EditClientScope() {
try {
await adminClient.clientScopes.del({ id });
addAlert(t("deletedSuccessClientScope"), AlertVariant.success);
navigate(toClientScopes({ realm }));
void navigate(toClientScopes({ realm }));
} catch (error) {
addError("deleteErrorClientScope", error);
}
Expand Down Expand Up @@ -179,7 +179,7 @@ export default function EditClientScope() {
): Promise<void> => {
if (!Array.isArray(mappers)) {
const mapper = mappers as ProtocolMapperTypeRepresentation;
navigate(
void navigate(
toMapper({
realm,
id: clientScope!.id!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function MappingDetails() {
});
}
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
navigate(toDetails());
void navigate(toDetails());
} catch (error) {
addError("mappingDeletedError", error);
}
Expand Down Expand Up @@ -171,7 +171,7 @@ export default function MappingDetails() {
}
addAlert(t(`mapping${key}Success`), AlertVariant.success);
if (!isUpdating) {
navigate(toDetails());
void navigate(toDetails());
}
} catch (error) {
addError(`mapping${key}Error`, error);
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/clients/ClientDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export default function ClientDetails() {
try {
await adminClient.clients.del({ id: clientId });
addAlert(t("clientDeletedSuccess"), AlertVariant.success);
navigate(toClients({ realm }));
void navigate(toClients({ realm }));
} catch (error) {
addError("clientDeleteError", error);
}
Expand Down
6 changes: 4 additions & 2 deletions js/apps/admin-ui/src/clients/add/NewClientForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export default function NewClientForm() {
clientId: client.clientId?.trim(),
});
addAlert(t("createClientSuccess"), AlertVariant.success);
navigate(toClient({ realm, clientId: newClient.id, tab: "settings" }));
void navigate(
toClient({ realm, clientId: newClient.id, tab: "settings" }),
);
} catch (error) {
addError("createClientError", error);
} finally {
Expand All @@ -104,7 +106,7 @@ export default function NewClientForm() {
<PageSection variant="light">
<FormProvider {...form}>
<Wizard
=> navigate(toClients({ realm }))}
=> void navigate(toClients({ realm }))}
navAriaLabel={`${title} steps`}
>
isProgressive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const EmptyButton = ({
variant="secondary"
=>
!disabled &&
navigate(toNewPermission({ realm, id: clientId, permissionType }))
void navigate(toNewPermission({ realm, id: clientId, permissionType }))
}
>
{t(`create${toUpperCase(permissionType)}BasedPermission`)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function PermissionDetails() {
permission,
);
setPermission(result);
navigate(
void navigate(
toPermissionDetails({
realm,
id,
Expand Down Expand Up @@ -166,7 +166,7 @@ export default function PermissionDetails() {
permissionId: permissionId,
});
addAlert(t("permissionDeletedSuccess"), AlertVariant.success);
navigate(
void navigate(
toAuthorizationTab({ realm, clientId: id, tab: "permissions" }),
);
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/clients/authorization/Permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const AuthorizationPermissions = ({
isDisabled={isDisabled || disabledCreate?.resources}
component="button"
=>
navigate(
void navigate(
toNewPermission({
realm,
id: clientId,
Expand All @@ -247,7 +247,7 @@ export const AuthorizationPermissions = ({
isDisabled={isDisabled || disabledCreate?.scopes}
component="button"
=>
navigate(
void navigate(
toNewPermission({
realm,
id: clientId,
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/clients/authorization/Policies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const AuthorizationPolicies = ({
<NewPolicyDialog
policyProviders={policyProviders}
=>
navigate(
void navigate(
isAdminPermissionsClient
? toCreatePermissionPolicy({
realm,
Expand Down Expand Up @@ -379,7 +379,7 @@ export const AuthorizationPolicies = ({
(p) => p.type !== "aggregate",
)}
=>
navigate(
void navigate(
isAdminPermissionsClient
? toCreatePermissionPolicy({
realm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ export default function ResourceDetails() {
resource,
);
setResource(resource);
navigate(toResourceDetails({ realm, id, resourceId: result._id! }));
void navigate(
toResourceDetails({ realm, id, resourceId: result._id! }),
);
}
addAlert(
t((resourceId ? "update" : "create") + "ResourceSuccess"),
Expand Down Expand Up @@ -152,7 +154,9 @@ export default function ResourceDetails() {
resourceId: resourceId!,
});
addAlert(t("resourceDeletedSuccess"), AlertVariant.success);
navigate(toAuthorizationTab({ realm, clientId: id, tab: "resources" }));
void navigate(
toAuthorizationTab({ realm, clientId: id, tab: "resources" }),
);
} catch (error) {
addError("resourceDeletedError", error);
}
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/clients/authorization/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export const AuthorizationResources = ({
isDisabled={isDisabled}
primaryActionText={t("createResource")}
=>
navigate(toCreateResource({ realm, id: clientId }))
void navigate(toCreateResource({ realm, id: clientId }))
}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ export const ResourcesPolicySelect = ({
=> {
if (isDirty) {
event.preventDefault();
setOnUnsavedChangesConfirm(() => () => navigate(to(item)));
setOnUnsavedChangesConfirm(
() => () => void navigate(to(item)),
);
toggleUnsavedChangesDialog();
}
}}
Expand All @@ -256,7 +258,7 @@ export const ResourcesPolicySelect = ({
<NewPolicyDialog
policyProviders={policyProviders}
=> {
navigate(
void navigate(
toCreatePolicy({ id: clientId, realm, policyType: p.type! }),
);
}}
Expand Down
8 changes: 6 additions & 2 deletions js/apps/admin-ui/src/clients/authorization/ScopeDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export default function ScopeDetails() {
iconUri: scope.iconUri,
},
);
navigate(toAuthorizationTab({ realm, clientId: id, tab: "scopes" }));
void navigate(
toAuthorizationTab({ realm, clientId: id, tab: "scopes" }),
);
}
addAlert(
t((scopeId ? "update" : "create") + "ScopeSuccess"),
Expand All @@ -90,7 +92,9 @@ export default function ScopeDetails() {
toggleDialog={toggleDeleteDialog}
selectedScope={scope}
refresh={() =>
navigate(toAuthorizationTab({ realm, clientId: id, tab: "scopes" }))
void navigate(
toAuthorizationTab({ realm, clientId: id, tab: "scopes" }),
)
}
/>
<ViewHeader
Expand Down
4 changes: 3 additions & 1 deletion js/apps/admin-ui/src/clients/authorization/Scopes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ export const AuthorizationScopes = ({
message={t("emptyAuthorizationScopes")}
instructions={t("emptyAuthorizationInstructions")}
isDisabled={isDisabled}
=> navigate(toNewScope({ id: clientId, realm }))}
=>
void navigate(toNewScope({ id: clientId, realm }))
}
primaryActionText={t("createAuthorizationScope")}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default function PolicyDetails() {
policy,
);

navigate(
void navigate(
navigateTo({
realm: realm!,
id: clientId!,
Expand Down Expand Up @@ -181,7 +181,7 @@ export default function PolicyDetails() {
policyId,
});
addAlert(t("policyDeletedSuccess"), AlertVariant.success);
navigate(
void navigate(
isAdminPermissionsClient
? toPermissionsConfigurationTabs({
realm: realm!,
Expand Down
4 changes: 3 additions & 1 deletion js/apps/admin-ui/src/clients/import/ImportForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export default function ImportForm() {
}),
});
addAlert(t("clientImportSuccess"), AlertVariant.success);
navigate(toClient({ realm, clientId: newClient.id, tab: "settings" }));
void navigate(
toClient({ realm, clientId: newClient.id, tab: "settings" }),
);
} catch (error) {
addError("clientImportError", error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function CreateInitialAccessToken() {
toggleDialog={() => {
setToken("");
addAlert(t("tokenSaveSuccess"), AlertVariant.success);
navigate(toClients({ realm, tab: "initial-access-token" }));
void navigate(toClients({ realm, tab: "initial-access-token" }));
}}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const InitialAccessTokenList = () => {
instructions={t("noTokensInstructions")}
primaryActionText={t("create")}
=>
navigate(toCreateInitialAccessToken({ realm }))
void navigate(toCreateInitialAccessToken({ realm }))
}
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const ClientRegistrationList = ({
{isAddDialogOpen && (
<AddProviderDialog
=>
navigate(
void navigate(
toRegistrationProvider({
realm,
subTab: subTab || "anonymous",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export default function DetailProvider() {
await adminClient.components.update({ id }, updatedComponent);
} else {
const { id } = await adminClient.components.create(updatedComponent);
navigate(toRegistrationProvider({ id, realm, subTab, providerId }));
void navigate(
toRegistrationProvider({ id, realm, subTab, providerId }),
);
}
addAlert(t(`provider${id ? "Updated" : "Create"}Success`));
} catch (error) {
Expand All @@ -97,7 +99,7 @@ export default function DetailProvider() {
id: id!,
});
addAlert(t("clientRegisterPolicyDeleteSuccess"));
navigate(toClientRegistration({ realm, subTab }));
void navigate(toClientRegistration({ realm, subTab }));
} catch (error) {
addError("clientRegisterPolicyDeleteError", error);
}
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/clients/roles/CreateClientRole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function CreateClientRole() {
}))!;

addAlert(t("roleCreated"), AlertVariant.success);
navigate(
void navigate(
toClientRole({
realm,
clientId: clientId!,
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/clients/scopes/DedicatedScopes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function DedicatedScopes() {
): Promise<void> => {
if (!Array.isArray(mappers)) {
const mapper = mappers as ProtocolMapperTypeRepresentation;
navigate(
void navigate(
toMapper({
realm,
id: client.id!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => {
{
title: t("edit"),
onClick() {
navigate(
void navigate(
toPermissionDetails({
realm,
id: realmId,
Expand Down
Loading
Loading
0