diff --git a/routes/tenant/rent/confirmation/index.tsx b/routes/tenant/rent/confirmation/index.tsx new file mode 100644 index 0000000..ef0090f --- /dev/null +++ b/routes/tenant/rent/confirmation/index.tsx @@ -0,0 +1,58 @@ +import { define } from "../../../../utils.ts"; +import { page } from "fresh"; + +export const handler = define.handlers({ + async GET(ctx) { + const url = new URL(ctx.req.url); + const success = url.searchParams.get("success") === "true"; + const amount = url.searchParams.get("amount") ?? ""; + return page({ success, amount }); + }, +}); + +export default define.page(function RentConfirmation({ data }) { + const { success, amount } = data as { success: boolean; amount?: string }; + return ( +
Amount: ${amount}
+ )} ++ A receipt is available from your payment history. +
+ + View Payments + + > + ) + : ( + <> ++ Please try again or contact support. +
+ + Back to Rent Payment + + > + )} +