"use client"; import { cancelPayment } from "@/actions/payment"; import { tryCatch } from "@/utils/tryCatch"; import { Loader2, Trash2 } from "lucide-react"; import { useRouter } from "next/navigation"; import React from "react"; import { toast } from "sonner"; import { Button } from "../ui/button"; export default function CancelPaymentButton({ paymentId, }: { paymentId: string }) { const router = useRouter(); const [loading, setLoading] = React.useState(false); return ( ); }