From a093ab1666f619b87f00bb35fe625b850b188149 Mon Sep 17 00:00:00 2001 From: i701 Date: Fri, 30 May 2025 20:40:24 +0500 Subject: [PATCH] fix: update welcome message in ApplicationLayout and simplify payment verification logic in DevicesToPay --- components/auth/application-layout.tsx | 2 +- components/devices-to-pay.tsx | 23 ++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/components/auth/application-layout.tsx b/components/auth/application-layout.tsx index 7cdb4e4..fc5fbf2 100644 --- a/components/auth/application-layout.tsx +++ b/components/auth/application-layout.tsx @@ -46,7 +46,7 @@ export async function ApplicationLayout({
- Logged in as,{" "} + Welcome,{" "} {session?.user?.first_name} {session?.user?.last_name} diff --git a/components/devices-to-pay.tsx b/components/devices-to-pay.tsx index 3084225..d7eb4d0 100644 --- a/components/devices-to-pay.tsx +++ b/components/devices-to-pay.tsx @@ -101,26 +101,11 @@ export default function DevicesToPay({ disabled={verifying} onClick={async () => { setVerifying(true); - // const res = await verifyPayment({ - // userId: user?.id ?? "", - // paymentId: payment?.id, - // benefName: user?.name ?? "", - // accountNo: user?.accNo ?? "", - // absAmount: String(payment?.amount), - // type: "TRANSFER", - // time: formatDate(new Date(payment?.createdAt || "")), - // }); + const res = await verifyPayment({ + id: payment?.id ?? "", + method: "TRANSFER", + }); setVerifying(false); - // switch (true) { - // case res?.success === true: - // toast.success(res.message); - // break; - // case res?.success === false: - // toast.error(res?.message); - // break; - // default: - // toast.error("Unexpected error occurred."); - // } }} size={"lg"} className="mb-4"