diff options
Diffstat (limited to 'packages/demobank-ui/src/pages/account')
3 files changed, 26 insertions, 17 deletions
diff --git a/packages/demobank-ui/src/pages/account/CashoutListForAccount.tsx b/packages/demobank-ui/src/pages/account/CashoutListForAccount.tsx index 656c2a52a..14f4acdb8 100644 --- a/packages/demobank-ui/src/pages/account/CashoutListForAccount.tsx +++ b/packages/demobank-ui/src/pages/account/CashoutListForAccount.tsx @@ -23,18 +23,20 @@ import { RouteDefinition } from "../../route.js"; interface Props { account: string; - routeClose: RouteDefinition<Record<string, never>>; + routeClose: RouteDefinition; onAuthorizationRequired: () => void; routeCashoutDetails: RouteDefinition<{ cid: string }>; - routeMyAccountDetails: RouteDefinition<Record<string, never>>; - routeMyAccountDelete: RouteDefinition<Record<string, never>>; - routeMyAccountPassword: RouteDefinition<Record<string, never>>; - routeMyAccountCashout: RouteDefinition<Record<string, never>>; + routeMyAccountDetails: RouteDefinition; + routeMyAccountDelete: RouteDefinition; + routeMyAccountPassword: RouteDefinition; + routeMyAccountCashout: RouteDefinition; + routeCreateCashout: RouteDefinition; } export function CashoutListForAccount({ account, onAuthorizationRequired, + routeCreateCashout, routeCashoutDetails, routeMyAccountCashout, routeMyAccountDelete, @@ -68,6 +70,7 @@ export function CashoutListForAccount({ <CreateCashout focus + routeHere={routeCreateCashout} routeClose={routeClose} onAuthorizationRequired={onAuthorizationRequired} account={account} diff --git a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx index 8cd758c75..db76e83d9 100644 --- a/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx +++ b/packages/demobank-ui/src/pages/account/ShowAccountDetails.tsx @@ -49,13 +49,15 @@ export function ShowAccountDetails({ routeMyAccountCashout, routeMyAccountDelete, routeMyAccountDetails, + routeHere, routeMyAccountPassword, }: { - routeClose: RouteDefinition<Record<string, never>>; - routeMyAccountDetails: RouteDefinition<Record<string, never>>; - routeMyAccountDelete: RouteDefinition<Record<string, never>>; - routeMyAccountPassword: RouteDefinition<Record<string, never>>; - routeMyAccountCashout: RouteDefinition<Record<string, never>>; + routeClose: RouteDefinition; + routeHere: RouteDefinition<{ account: string }>; + routeMyAccountDetails: RouteDefinition; + routeMyAccountDelete: RouteDefinition; + routeMyAccountPassword: RouteDefinition; + routeMyAccountCashout: RouteDefinition; onUpdateSuccess: () => void; onAuthorizationRequired: () => void; account: string; @@ -154,6 +156,7 @@ export function ShowAccountDetails({ updateBankState("currentChallenge", { operation: "update-account", id: String(resp.body.challenge_id), + location: routeHere.url({ account }), sent: AbsoluteTime.never(), request: submitAccount, }); diff --git a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx index d15420b84..dfa0adf17 100644 --- a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx +++ b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx @@ -46,12 +46,14 @@ export function UpdateAccountPassword({ routeMyAccountDetails, routeMyAccountPassword, focus, + routeHere, }: { - routeClose: RouteDefinition<Record<string, never>>; - routeMyAccountDetails: RouteDefinition<Record<string, never>>; - routeMyAccountDelete: RouteDefinition<Record<string, never>>; - routeMyAccountPassword: RouteDefinition<Record<string, never>>; - routeMyAccountCashout: RouteDefinition<Record<string, never>>; + routeClose: RouteDefinition; + routeHere: RouteDefinition<{ account: string }>; + routeMyAccountDetails: RouteDefinition; + routeMyAccountDelete: RouteDefinition; + routeMyAccountPassword: RouteDefinition; + routeMyAccountCashout: RouteDefinition; focus?: boolean; onAuthorizationRequired: () => void; onUpdateSuccess: () => void; @@ -128,6 +130,7 @@ export function UpdateAccountPassword({ updateBankState("currentChallenge", { operation: "update-password", id: String(resp.body.challenge_id), + location: routeHere.url({ account: accountName }), sent: AbsoluteTime.never(), request, }); @@ -172,7 +175,7 @@ export function UpdateAccountPassword({ > <div class="px-4 py-6 sm:p-8"> <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6"> - {accountIsTheCurrentUser ? ( + {accountIsTheCurrentUser ? ( <div class="sm:col-span-5"> <label class="block text-sm font-medium leading-6 text-gray-900" @@ -205,7 +208,7 @@ export function UpdateAccountPassword({ </p> </div> ) : undefined} - + <div class="sm:col-span-5"> <label class="block text-sm font-medium leading-6 text-gray-900" |