diff --git a/components/topups-table.tsx b/components/topups-table.tsx index dd5879c..f7fb0ab 100644 --- a/components/topups-table.tsx +++ b/components/topups-table.tsx @@ -103,19 +103,19 @@ export async function TopupsTable({ View Details - {!topup.is_expired && ( - - - {topup.paid ? "Paid" : "Unpaid"} - - )} + {!topup.is_expired && + topup.status !== "CANCELLED" && ( + + {topup.paid ? "Paid" : "Unpaid"} + + )} @@ -123,7 +123,12 @@ export async function TopupsTable({ {topup.paid ? ( - {topup.status} + + {topup.status} + ) : topup.is_expired ? ( Expired ) : ( @@ -144,19 +149,14 @@ export async function TopupsTable({ {meta?.total === 1 ? ( - - Total {meta?.total} topup. - + Total {meta?.total} topup. ) : ( - - Total {meta?.total} topups. - + Total {meta?.total} topups. )} - {data.map((topup) => ( @@ -203,7 +203,7 @@ function MobileTopupDetails({ topup }: { topup: Topup }) { View Details - {topup.status !== "CANCELLED" && ( + {!topup.is_expired && topup.status !== "CANCELLED" && ( )} - + + Amount {topup.amount.toFixed(2)} MVR + + {topup.paid ? ( + + {topup.status} + + ) : topup.is_expired ? ( + Expired + ) : ( + {topup.status} + )} + );
- Total {meta?.total} topup. -
Total {meta?.total} topup.
- Total {meta?.total} topups. -
Total {meta?.total} topups.