diff options
author | Sebastian <sebasjm@gmail.com> | 2023-02-17 16:23:37 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-02-17 16:23:49 -0300 |
commit | 9697e953f56dc37208c2852d686d1854256f71ef (patch) | |
tree | fbbe6e5934c1a8dd438da76d37b719372811b542 /packages/demobank-ui/src/pages/BankFrame.tsx | |
parent | 8b83f729d7394837a3be231bbeeea44f6a01e9a1 (diff) | |
download | wallet-core-9697e953f56dc37208c2852d686d1854256f71ef.tar.xz |
cashout for business accounts
Diffstat (limited to 'packages/demobank-ui/src/pages/BankFrame.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/BankFrame.tsx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx index 0fb75b87b..fe7571c38 100644 --- a/packages/demobank-ui/src/pages/BankFrame.tsx +++ b/packages/demobank-ui/src/pages/BankFrame.tsx @@ -128,7 +128,7 @@ export function BankFrame({ <StatusBanner /> {backend.state.status === "loggedIn" ? ( <div class="top-right"> - {goToBusinessAccount ? ( + {goToBusinessAccount && !backend.state.isUserAdministrator ? ( <MaybeBusinessButton account={backend.state.username} onClick={goToBusinessAccount} @@ -187,7 +187,7 @@ export function ErrorBanner({ onClear, }: { error: ErrorMessage; - onClear: () => void; + onClear?: () => void; }): VNode | null { return ( <div class="informational informational-fail" style={{ marginTop: 8 }}> @@ -196,15 +196,17 @@ export function ErrorBanner({ <b>{error.title}</b> </p> <div> - <input - type="button" - class="pure-button" - value="Clear" - onClick={(e) => { - e.preventDefault(); - onClear(); - }} - /> + {onClear && ( + <input + type="button" + class="pure-button" + value="Clear" + onClick={(e) => { + e.preventDefault(); + onClear(); + }} + /> + )} </div> </div> <p>{error.description}</p> |