import Head from "next/head"; import prisma from "../../lib/prisma"; import { getIntegrationName, getIntegrationType } from "../../lib/integrations"; import Shell from "../../components/Shell"; import { useState } from "react"; import { useRouter } from "next/router"; import { useSession, getSession } from "next-auth/client"; export default function integration(props) { const router = useRouter(); const [session, loading] = useSession(); const [showAPIKey, setShowAPIKey] = useState(false); if (loading) { return
; } function toggleShowAPIKey() { setShowAPIKey(!showAPIKey); } async function deleteIntegrationHandler(event) { event.preventDefault(); const response = await fetch("/api/integrations", { method: "DELETE", body: JSON.stringify({ id: props.integration.id }), headers: { "Content-Type": "application/json", }, }); router.push("/integrations"); } return (Manage and delete integrations.
Information about your {getIntegrationName(props.integration.type)} integration.
Once you delete this integration, it will be permanently removed.