"use client"; import { useState } from "react"; import { useRouter } from "next/navigation"; import { markParticipantPaidAction } from "@/features/booking/actions"; interface MarkPaidButtonProps { tripId: string; disabled?: boolean; } export function MarkPaidButton({ tripId, disabled }: MarkPaidButtonProps) { const router = useRouter(); const [loading, setLoading] = useState(false); const [error, setError] = useState(""); async function handleClick() { setLoading(true); setError(""); const result = await markParticipantPaidAction(tripId); setLoading(false); if (result.error) { setError(result.error); return; } router.refresh(); } return (
{error && (
{error}
)}

Tekan setelah kamu transfer ke rekening di atas. Organizer akan cek & konfirmasi pembayaran kamu.

); }