mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 10:10:30 +00:00
25 lines
774 B
TypeScript
25 lines
774 B
TypeScript
import { useOrganization, useUser } from "@app/context";
|
|
import { useGetOrgUsers } from "@app/hooks/api";
|
|
|
|
import { OrgDeleteSection } from "../OrgDeleteSection";
|
|
import { OrgIncidentContactsSection } from "../OrgIncidentContactsSection";
|
|
import { OrgNameChangeSection } from "../OrgNameChangeSection";
|
|
|
|
export const OrgGeneralTab = () => {
|
|
const { currentOrg } = useOrganization();
|
|
const { user } = useUser();
|
|
const { data: members } = useGetOrgUsers(currentOrg?._id ?? "");
|
|
|
|
const membershipOrg = members?.find((member) => member.user._id === user?._id);
|
|
|
|
return (
|
|
<div>
|
|
<OrgNameChangeSection />
|
|
<OrgIncidentContactsSection />
|
|
{(membershipOrg && membershipOrg.role === "admin") && (
|
|
<OrgDeleteSection />
|
|
)}
|
|
</div>
|
|
);
|
|
};
|