diff options
author | Sebastian <sebasjm@gmail.com> | 2022-08-10 11:50:46 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-08-10 11:50:46 -0300 |
commit | dce055d0d3fe2037d4c3018baa360b9082e37194 (patch) | |
tree | fd8daa463459b4daa78fe41bb5262d302d03ff7a /packages/taler-wallet-webextension/src/wallet/Application.tsx | |
parent | 7a600514c6d43bbaeba6b962533415e59fc46057 (diff) | |
download | wallet-core-dce055d0d3fe2037d4c3018baa360b9082e37194.tar.xz |
withdraw call to action
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Application.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Application.tsx | 81 |
1 files changed, 49 insertions, 32 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx index 603163cee..f6cef7e90 100644 --- a/packages/taler-wallet-webextension/src/wallet/Application.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx @@ -76,33 +76,34 @@ export function Application(): VNode { <IoCProviderForRuntime> {/* <Match/> won't work in the first render if <Router /> is not called first */} {/* https://github.com/preactjs/preact-router/issues/415 */} - <Router history={hash_history} /> - <Match> - {({ path }: { path: string }) => { - if (path && path.startsWith("/cta")) return; - return ( - <Fragment> - <LogoHeader /> - <WalletNavBar path={path} /> - {shouldShowPendingOperations(path) && ( - <div - style={{ - backgroundColor: "lightcyan", - display: "flex", - justifyContent: "center", - }} - > - <PendingTransactions - goToTransaction={(tid: string) => - redirectTo(Pages.balanceTransaction({ tid })) - } - /> - </div> - )} - </Fragment> - ); - }} - </Match> + <Router history={hash_history}> + <Match default> + {({ path }: { path: string }) => { + if (path && path.startsWith("/cta")) return; + return ( + <Fragment> + <LogoHeader /> + <WalletNavBar path={path} /> + {shouldShowPendingOperations(path) && ( + <div + style={{ + backgroundColor: "lightcyan", + display: "flex", + justifyContent: "center", + }} + > + <PendingTransactions + goToTransaction={(tid: string) => + redirectTo(Pages.balanceTransaction({ tid })) + } + /> + </div> + )} + </Fragment> + ); + }} + </Match> + </Router> <WalletBox> {globalNotification && ( <SuccessBox onClick={clearNotification}> @@ -206,12 +207,28 @@ export function Application(): VNode { goToWalletManualWithdraw={(currency?: string) => redirectTo(Pages.balanceManualWithdraw({ currency })) } - goBack={() => redirectTo(Pages.balance)} + cancel={() => redirectTo(Pages.balance)} + /> + <Route + path={Pages.ctaRefund} + component={RefundPage} + cancel={() => redirectTo(Pages.balance)} + /> + <Route + path={Pages.ctaTips} + component={TipPage} + cancel={() => redirectTo(Pages.balance)} + /> + <Route + path={Pages.ctaWithdraw} + component={WithdrawPage} + cancel={() => redirectTo(Pages.balance)} + /> + <Route + path={Pages.ctaDeposit} + component={DepositPageCTA} + cancel={() => redirectTo(Pages.balance)} /> - <Route path={Pages.ctaRefund} component={RefundPage} /> - <Route path={Pages.ctaTips} component={TipPage} /> - <Route path={Pages.ctaWithdraw} component={WithdrawPage} /> - <Route path={Pages.ctaDeposit} component={DepositPageCTA} /> {/** * NOT FOUND |