import { getPayment } from "@/actions/payment"; import { authOptions } from "@/app/auth"; import DevicesToPay from "@/components/devices-to-pay"; import { cn } from "@/lib/utils"; import { tryCatch } from "@/utils/tryCatch"; import { getServerSession } from "next-auth"; import { headers } from "next/headers"; import React from "react"; 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