import { FC } from "react"; import Link from "next/link"; import { useRouter } from "next/router"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // ui import { ToggleSwitch } from "@plane/ui"; // types import { IWebhook } from "types"; interface IWebhookListItem { webhook: IWebhook; } export const WebhooksListItem: FC = (props) => { const { webhook } = props; // router const router = useRouter(); const { workspaceSlug } = router.query; const { webhook: { updateWebhook }, } = useMobxStore(); const handleToggle = () => { if (!workspaceSlug || !webhook.id) return; updateWebhook(workspaceSlug.toString(), webhook.id, { is_active: !webhook.is_active }); }; return (
{webhook.url}
); };