mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 08:27:36 +00:00
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { useTranslation } from "react-i18next";
|
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
|
import {
|
|
Button
|
|
} from "@app/components/v2";
|
|
import { usePopUp } from "@app/hooks";
|
|
|
|
import { AddOrgIncidentContactModal } from "./AddOrgIncidentContactModal";
|
|
import { OrgIncidentContactsTable } from "./OrgIncidentContactsTable";
|
|
|
|
export const OrgIncidentContactsSection = () => {
|
|
const { t } = useTranslation();
|
|
const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
|
|
"addContact"
|
|
] as const);
|
|
|
|
return (
|
|
<div className="mb-6 p-4 bg-mineshaft-900 max-w-screen-lg rounded-lg border border-mineshaft-600">
|
|
<div className="flex justify-between mb-8">
|
|
<p className="min-w-max text-xl font-semibold">
|
|
{t("section.incident.incident-contacts")}
|
|
</p>
|
|
<Button
|
|
colorSchema="secondary"
|
|
type="submit"
|
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
|
onClick={() => handlePopUpOpen("addContact")}
|
|
>
|
|
Add contact
|
|
</Button>
|
|
</div>
|
|
<OrgIncidentContactsTable />
|
|
<AddOrgIncidentContactModal
|
|
popUp={popUp}
|
|
handlePopUpClose={handlePopUpClose}
|
|
handlePopUpToggle={handlePopUpToggle}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|