mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix lint type issues
This commit is contained in:
@@ -160,7 +160,7 @@ export const MemberListTab = () => {
|
|||||||
|
|
||||||
const findRoleFromId = useCallback(
|
const findRoleFromId = useCallback(
|
||||||
(roleId: string) => {
|
(roleId: string) => {
|
||||||
return roles.find(({ _id: id }) => id === roleId);
|
return (roles || []).find(({ _id: id }) => id === roleId);
|
||||||
},
|
},
|
||||||
[roles]
|
[roles]
|
||||||
);
|
);
|
||||||
@@ -305,7 +305,7 @@ export const MemberListTab = () => {
|
|||||||
onRoleChange(membershipId, selectedRole)
|
onRoleChange(membershipId, selectedRole)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{roles
|
{(roles || [])
|
||||||
.filter(({ slug }) =>
|
.filter(({ slug }) =>
|
||||||
slug === "owner" ? isIamOwner || role === "owner" : true
|
slug === "owner" ? isIamOwner || role === "owner" : true
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ export const ProjectRoleList = ({ onSelectRole }: Props) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// roles={roles as TRole<string>[]}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="mb-4 flex">
|
<div className="mb-4 flex">
|
||||||
@@ -99,7 +101,7 @@ export const ProjectRoleList = ({ onSelectRole }: Props) => {
|
|||||||
</THead>
|
</THead>
|
||||||
<TBody>
|
<TBody>
|
||||||
{isRolesLoading && <TableSkeleton columns={4} innerKey="org-roles" />}
|
{isRolesLoading && <TableSkeleton columns={4} innerKey="org-roles" />}
|
||||||
{roles?.map((role) => {
|
{(roles as TRole<string>[])?.map((role) => {
|
||||||
const { _id: id, name, slug } = role;
|
const { _id: id, name, slug } = role;
|
||||||
const isNonMutatable = ["admin", "member", "viewer"].includes(slug);
|
const isNonMutatable = ["admin", "member", "viewer"].includes(slug);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user