"use client"; import type { SSOConnection } from "@calcom/ee/sso/lib/saml"; import { Dialog } from "@calcom/features/components/controlled-dialog"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Button } from "@calcom/ui/components/button"; import { DialogTrigger, ConfirmationDialogContent } from "@calcom/ui/components/dialog"; import { Label } from "@calcom/ui/components/form"; import { ClipboardIcon } from "@coss/ui/icons"; import { showToast } from "@calcom/ui/components/toast"; import { Tooltip } from "@calcom/ui/components/tooltip"; export default function ConnectionInfo({ teamId, connection, }: { teamId: number | null; connection: SSOConnection; }) { const { t } = useLocale(); const utils = trpc.useUtils(); const connectionType = connection.type.toUpperCase(); // Delete SSO connection const mutation = trpc.viewer.saml.delete.useMutation({ async onSuccess() { showToast( t("sso_connection_deleted_successfully", { connectionType, }), "success" ); await utils.viewer.saml.get.invalidate(); }, }); const deleteConnection = async () => { mutation.mutate({ teamId, }); }; return (
{acsUrl}
{entityId}
{callbackUrl}