import { faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { OrgPermissionCan } from "@app/components/permissions"; import { Button } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@app/context"; import { useAddOrgPmtMethod } from "@app/hooks/api"; import { PmtMethodsTable } from "./PmtMethodsTable"; export const PmtMethodsSection = () => { const { currentOrg } = useOrganization(); const { mutateAsync, isPending } = useAddOrgPmtMethod(); const handleAddPmtMethodBtnClick = async () => { if (!currentOrg?.id) return; const url = await mutateAsync({ organizationId: currentOrg.id, success_url: window.location.href, cancel_url: window.location.href }); window.location.href = url; }; return (

Payment methods

{(isAllowed) => ( )}
); };