import { getPayment } from "@/actions/payment"; import { authOptions } from "@/app/auth"; import CancelPaymentButton from "@/components/billing/cancel-payment-button"; import DevicesToPay from "@/components/devices-to-pay"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { tryCatch } from "@/utils/tryCatch"; import { Trash2 } from "lucide-react"; import { getServerSession } from "next-auth"; export default async function PaymentPage({ params, }: { params: Promise<{ paymentId: string }>; }) { const session = await getServerSession(authOptions); const paymentId = (await params).paymentId; const [error, payment] = await tryCatch(getPayment({ id: paymentId })); if (error) { return Error getting payment: {error.message}; } return (