calcom/components/webhook/WebhookList.tsx
Omar López 30f97117e8
Revert "Revert "Feature/cal 274 add webhooks (#628)" (#854)" (#876)
This reverts commit 6868474c92.

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-07 15:14:47 +00:00

23 lines
636 B
TypeScript

import { Webhook } from "@lib/webhook";
import WebhookListItem from "./WebhookListItem";
export default function WebhookList(props: {
webhooks: Webhook[];
onChange: () => void;
onEditWebhook: (webhook: Webhook) => void;
}) {
return (
<div>
<ul className="px-4 mb-2 bg-white border divide-y divide-gray-200 rounded">
{props.webhooks.map((webhook: Webhook) => (
<WebhookListItem
onChange={props.onChange}
key={webhook.id}
webhook={webhook}
onEditWebhook={() => props.onEditWebhook(webhook)}></WebhookListItem>
))}
</ul>
</div>
);
}