From 9e25da717ba06d36e60aed9d1de4bfff4b446213 Mon Sep 17 00:00:00 2001 From: i701 Date: Sun, 6 Jul 2025 22:37:23 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20add=20expiry=20label=20to=20ExpiryCount?= =?UTF-8?q?Down=20component=20in=20TopupPage=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(dashboard)/payments/[paymentId]/page.tsx | 20 +++++++++++++++---- app/(dashboard)/top-ups/[topupId]/page.tsx | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/(dashboard)/payments/[paymentId]/page.tsx b/app/(dashboard)/payments/[paymentId]/page.tsx index 9f53c3b..1e0b151 100644 --- a/app/(dashboard)/payments/[paymentId]/page.tsx +++ b/app/(dashboard)/payments/[paymentId]/page.tsx @@ -1,11 +1,12 @@ +import { redirect } from "next/navigation"; import { getPayment, getProfile } from "@/actions/payment"; import CancelPaymentButton from "@/components/billing/cancel-payment-button"; +import ExpiryCountDown from "@/components/billing/expiry-time-countdown"; import ClientErrorMessage from "@/components/client-error-message"; import DevicesToPay from "@/components/devices-to-pay"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { tryCatch } from "@/utils/tryCatch"; -import { redirect } from "next/navigation"; export default async function PaymentPage({ params, }: { @@ -40,13 +41,24 @@ export default async function PaymentPage({ {payment?.paid ? "Paid" : "Pending"} {!payment.paid && ( - + payment.is_expired ? ( + + ) : ( + + ) )} - + {!payment.paid && ( + + )}
{!topup.paid && ( - + )}