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