import { faCheck,faCopy, faPencil } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { OrgPermissionCan } from "@app/components/permissions"; import { IconButton, Tooltip } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { useTimedReset } from "@app/hooks"; import { useGetIdentityById } from "@app/hooks/api"; import { UsePopUpState } from "@app/hooks/usePopUp"; type Props = { identityId: string; handlePopUpOpen: ( popUpName: keyof UsePopUpState<["identity", "identityAuthMethod", "token", "clientSecret"]>, data?: {} ) => void; }; export const IdentityDetailsSection = ({ identityId, handlePopUpOpen }: Props) => { const [copyTextId, isCopyingId, setCopyTextId] = useTimedReset({ initialState: "Copy ID to clipboard" }); const { data } = useGetIdentityById(identityId); return data ? (

Details

{(isAllowed) => { return ( { handlePopUpOpen("identity", { identityId, name: data.identity.name, role: data.role, customRole: data.customRole }); }} > ); }}

Identity ID

{data.identity.id}

{ navigator.clipboard.writeText(data.identity.id); setCopyTextId("Copied"); }} >

Name

{data.identity.name}

Organization Role

{data.role}

) : (
); };