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 (
{success ? ( <>

Payment Successful

{amount &&

Amount: ${amount}

}

A receipt is available from your payment history.

View Payments ) : ( <>

Payment Failed

Please try again or contact support.

Back to Rent Payment )}
); });