clean up types

This commit is contained in:
jenny-s51 2021-04-22 16:10:04 -04:00
parent b3f8c45ddc
commit 7b22ac4659
2 changed files with 4 additions and 5 deletions

View file

@ -33,7 +33,7 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
const { t } = useTranslation("roles");
const [name, setName] = useState("");
const adminClient = useAdminClient();
const [selectedRows, setSelectedRows] = useState<Role[]>([]);
const [selectedRows, setSelectedRows] = useState<RoleRepresentation[]>([]);
const errorHandler = useErrorHandler();
const [isFilterDropdownOpen, setIsFilterDropdownOpen] = useState(false);
@ -69,10 +69,10 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
)!.clientId!)
);
return alphabetize(filterDupes).filter((role: Role) => {
return alphabetize(filterDupes).filter((role: RoleRepresentation) => {
return (
props.existingCompositeRoles.find(
(existing: Role) => existing.name === role.name
(existing: RoleRepresentation) => existing.name === role.name
) === undefined && role.name !== name
);
});
@ -170,7 +170,6 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
onClick={() => {
props.toggleDialog();
props.onConfirm(selectedRows);
console.log(selectedRows);
}}
>
{t("common:add")}

View file

@ -134,7 +134,7 @@ export const AssociatedRolesTab = ({
refresh();
}, [additionalRoles, isInheritedHidden]);
const InheritedRoleName = (role: Role) => {
const InheritedRoleName = (role: RoleRepresentation) => {
return <>{inheritanceMap.current[role.id!]}</>;
};