Move custom role paywall to assignment step

This commit is contained in:
Tuan Dang
2023-11-26 13:18:49 +07:00
parent 5b923c25b5
commit 32f5c96dd2
12 changed files with 73 additions and 77 deletions
@@ -1,4 +1,3 @@
import { useCallback } from "react";
import { faServer, faXmark } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format } from "date-fns";
@@ -96,13 +95,6 @@ export const MachineIdentityTable = ({
});
}
}
const findRoleFromId = useCallback(
(roleId: string) => {
return (roles || []).find(({ _id: id }) => id === roleId);
},
[roles]
);
return (
<TableContainer>
@@ -141,7 +133,7 @@ export const MachineIdentityTable = ({
return (
<Select
value={
role === "custom" ? findRoleFromId(customRole)?.slug : role
role === "custom" ? customRole.slug : role
}
isDisabled={!isAllowed}
className="w-40 bg-mineshaft-600"