removed some remnant namespaces usage (#23669)
This commit is contained in:
parent
22868406c2
commit
c7183049c8
4 changed files with 5 additions and 20 deletions
|
@ -209,7 +209,6 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
|
|||
<ClientSelect
|
||||
name="client"
|
||||
label="client"
|
||||
namespace="clients"
|
||||
helpText={"clientHelp"}
|
||||
defaultValue={client.clientId}
|
||||
/>
|
||||
|
|
|
@ -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 = ({
|
|||
<FormGroup
|
||||
label={t(label!)}
|
||||
isRequired={required}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText={t(helpText!)}
|
||||
fieldLabelId={`${namespace}:${label}`}
|
||||
/>
|
||||
}
|
||||
labelIcon={<HelpItem helpText={t(helpText!)} fieldLabelId={label!} />}
|
||||
fieldId={name!}
|
||||
validated={errors[name!] ? "error" : "default"}
|
||||
helperTextInvalid={t("required")}
|
||||
|
|
|
@ -3,11 +3,5 @@ import { ClientSelect } from "../client/ClientSelect";
|
|||
import { convertToName } from "./DynamicComponents";
|
||||
|
||||
export const ClientSelectComponent = (props: ComponentProps) => {
|
||||
return (
|
||||
<ClientSelect
|
||||
{...props}
|
||||
name={convertToName(props.name!)}
|
||||
namespace="dynamic"
|
||||
/>
|
||||
);
|
||||
return <ClientSelect {...props} name={convertToName(props.name!)} />;
|
||||
};
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue