From c7183049c8a58fb796b4760e839517be2f5d095f Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 19 Oct 2023 14:07:48 +0200 Subject: [PATCH] removed some remnant namespaces usage (#23669) --- .../authorization/AuthorizationEvaluate.tsx | 1 - .../src/components/client/ClientSelect.tsx | 14 +++----------- .../components/dynamic/ClientSelectComponent.tsx | 8 +------- .../role-mapping/AddRoleMappingModal.tsx | 2 +- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx index 767a99001b..4c9a0f4751 100644 --- a/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx +++ b/js/apps/admin-ui/src/clients/authorization/AuthorizationEvaluate.tsx @@ -209,7 +209,6 @@ const AuthorizationEvaluateContent = ({ client }: Props) => { diff --git a/js/apps/admin-ui/src/components/client/ClientSelect.tsx b/js/apps/admin-ui/src/components/client/ClientSelect.tsx index bbcf6dbe90..96dca4c6f9 100644 --- a/js/apps/admin-ui/src/components/client/ClientSelect.tsx +++ b/js/apps/admin-ui/src/components/client/ClientSelect.tsx @@ -15,20 +15,17 @@ import { adminClient } from "../../admin-client"; import { useFetch } from "../../utils/useFetch"; import type { ComponentProps } from "../dynamic/components"; -type ClientSelectProps = ComponentProps & { - namespace: string; -}; +type ClientSelectProps = ComponentProps & {}; export const ClientSelect = ({ name, label, helpText, defaultValue, - namespace, isDisabled = false, required = false, }: ClientSelectProps) => { - const { t } = useTranslation(namespace); + const { t } = useTranslation(); const { control, formState: { errors }, @@ -66,12 +63,7 @@ export const ClientSelect = ({ - } + labelIcon={} fieldId={name!} validated={errors[name!] ? "error" : "default"} helperTextInvalid={t("required")} diff --git a/js/apps/admin-ui/src/components/dynamic/ClientSelectComponent.tsx b/js/apps/admin-ui/src/components/dynamic/ClientSelectComponent.tsx index 4b20a7ebe9..efaa64b341 100644 --- a/js/apps/admin-ui/src/components/dynamic/ClientSelectComponent.tsx +++ b/js/apps/admin-ui/src/components/dynamic/ClientSelectComponent.tsx @@ -3,11 +3,5 @@ import { ClientSelect } from "../client/ClientSelect"; import { convertToName } from "./DynamicComponents"; export const ClientSelectComponent = (props: ComponentProps) => { - return ( - - ); + return ; }; diff --git a/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx b/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx index d78f839e07..bbd54e8a47 100644 --- a/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx +++ b/js/apps/admin-ui/src/components/role-mapping/AddRoleMappingModal.tsx @@ -40,7 +40,7 @@ export const AddRoleMappingModal = ({ onAssign, onClose, }: AddRoleMappingModalProps) => { - const { t } = useTranslation(type); + const { t } = useTranslation(); const { hasAccess } = useAccess(); const canViewRealmRoles = hasAccess("view-realm") || hasAccess("query-users");