diff options
Diffstat (limited to 'packages/bank-ui/src/pages/admin/AdminHome.tsx')
-rw-r--r-- | packages/bank-ui/src/pages/admin/AdminHome.tsx | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/packages/bank-ui/src/pages/admin/AdminHome.tsx b/packages/bank-ui/src/pages/admin/AdminHome.tsx index 752d86aa6..b8b28f8a0 100644 --- a/packages/bank-ui/src/pages/admin/AdminHome.tsx +++ b/packages/bank-ui/src/pages/admin/AdminHome.tsx @@ -53,9 +53,9 @@ interface Props { routeCreate: RouteDefinition; routeDownloadStats: RouteDefinition; routeCreateWireTransfer: RouteDefinition<{ - account?: string, - subject?: string, - amount?: string, + account?: string; + subject?: string; + amount?: string; }>; routeShowAccount: RouteDefinition<{ account: string }>; @@ -68,7 +68,6 @@ export function AdminHome({ routeCreate, routeRemoveAccount, routeShowAccount, - routeShowCashoutsAccount, routeUpdatePasswordAccount, routeDownloadStats, routeCreateWireTransfer, @@ -77,7 +76,10 @@ export function AdminHome({ return ( <Fragment> <Metrics routeDownloadStats={routeDownloadStats} /> - <WireTransfer routeHere={routeCreateWireTransfer} onAuthorizationRequired={onAuthorizationRequired} /> + <WireTransfer + routeHere={routeCreateWireTransfer} + onAuthorizationRequired={onAuthorizationRequired} + /> <Transactions account="admin" @@ -87,7 +89,6 @@ export function AdminHome({ routeCreate={routeCreate} routeRemoveAccount={routeRemoveAccount} routeShowAccount={routeShowAccount} - routeShowCashoutsAccount={routeShowCashoutsAccount} routeUpdatePasswordAccount={routeUpdatePasswordAccount} /> </Fragment> @@ -355,13 +356,16 @@ function Metrics({ </div> <dl class="mt-5 grid grid-cols-1 md:grid-cols-2 divide-y divide-gray-200 overflow-hidden rounded-lg bg-white shadow-lg md:divide-x md:divide-y-0"> {resp.current.body.type !== "with-conversions" || - resp.previous.body.type !== "with-conversions" ? undefined : ( + resp.previous.body.type !== "with-conversions" ? undefined : ( <Fragment> <div class="px-4 py-5 sm:p-6"> <dt class="text-base font-normal text-gray-900"> <i18n.Translate>Cashin</i18n.Translate> <div class="text-xs text-gray-500"> - <i18n.Translate>Transferred from an external account to an account in this bank.</i18n.Translate> + <i18n.Translate> + Transferred from an external account to an account in this + bank. + </i18n.Translate> </div> </dt> <MetricValue @@ -375,8 +379,11 @@ function Metrics({ <i18n.Translate>Cashout</i18n.Translate> </dt> <div class="text-xs text-gray-500"> - <i18n.Translate>Transferred from an account in this bank to an external account.</i18n.Translate> - </div> + <i18n.Translate> + Transferred from an account in this bank to an external + account. + </i18n.Translate> + </div> <MetricValue current={resp.current.body.cashoutFiatVolume} previous={resp.previous.body.cashoutFiatVolume} @@ -389,7 +396,9 @@ function Metrics({ <dt class="text-base font-normal text-gray-900"> <i18n.Translate>Payin</i18n.Translate> <div class="text-xs text-gray-500"> - <i18n.Translate>Transferred from an account to a Taler exchange.</i18n.Translate> + <i18n.Translate> + Transferred from an account to a Taler exchange. + </i18n.Translate> </div> </dt> <MetricValue @@ -402,7 +411,9 @@ function Metrics({ <dt class="text-base font-normal text-gray-900"> <i18n.Translate>Payout</i18n.Translate> <div class="text-xs text-gray-500"> - <i18n.Translate>Transferred from a Taler exchange to another account.</i18n.Translate> + <i18n.Translate> + Transferred from a Taler exchange to another account. + </i18n.Translate> </div> </dt> <MetricValue @@ -444,9 +455,9 @@ function MetricValue({ const rate = !currAmount || - Number.isNaN(currAmount) || - !prevAmount || - Number.isNaN(prevAmount) + Number.isNaN(currAmount) || + !prevAmount || + Number.isNaN(prevAmount) ? 0 : cmp === -1 ? 1 - Math.round(currAmount) / Math.round(prevAmount) |