import React, { useEffect } from "react"; import Modal from "components/Modal"; import Button from "components/buttons/Button"; const baseClass = "delete-integration-modal"; interface IDeleteIntegrationModalProps { url: string; projectKey: string; onSubmit: () => void; onCancel: () => void; } const DeleteIntegrationModal = ({ url, projectKey, onSubmit, onCancel, }: IDeleteIntegrationModalProps): JSX.Element => { useEffect(() => { const listener = (event: KeyboardEvent) => { if (event.code === "Enter" || event.code === "NumpadEnter") { event.preventDefault(); onSubmit(); } }; document.addEventListener("keydown", listener); return () => { document.removeEventListener("keydown", listener); }; }, []); return (

This action will delete the{" "} {url} - {projectKey} {" "} integration.

The automations that use this integration will be turned off.

); }; export default DeleteIntegrationModal;