// Create a new file: ui/components/WebhookInfo.tsx import React, { useState } from "react"; import { useSonContext } from "@/contexts/SonContext"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Eye, EyeOff } from "lucide-react"; export function WebhookInfo() { const { webhook, webhookLoading, webhookError } = useSonContext(); const [showSecret, setShowSecret] = useState(false); if (webhookLoading) { return
Loading webhook information...
; } if (webhookError) { return
Error loading webhook information: {webhookError.message}
; } if (!webhook) { return
No webhook information available.
; } return ( Webhook Information
); }