diff options
Diffstat (limited to 'packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx')
-rw-r--r-- | packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx b/packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx index 415f88868..3f635db7e 100644 --- a/packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx +++ b/packages/bank-ui/src/pages/regional/ShowCashoutDetails.tsx @@ -16,7 +16,6 @@ import { AbsoluteTime, Amounts, - Duration, HttpStatusCode, TalerError, assertUnreachable, @@ -26,20 +25,19 @@ import { Loading, useTranslationContext, } from "@gnu-taler/web-util/browser"; -import { format } from "date-fns"; import { VNode, h } from "preact"; import { ErrorLoadingWithDebug } from "../../components/ErrorLoadingWithDebug.js"; +import { Time } from "../../components/Time.js"; import { useCashoutDetails, useConversionInfo } from "../../hooks/regional.js"; import { RouteDefinition } from "../../route.js"; import { RenderAmount } from "../PaytoWireTransferForm.js"; -import { Time } from "../../components/Time.js"; interface Props { id: string; routeClose: RouteDefinition; } export function ShowCashoutDetails({ id, routeClose }: Props): VNode { - const { i18n, dateLocale } = useTranslationContext(); + const { i18n } = useTranslationContext(); const cid = Number.parseInt(id, 10); const result = useCashoutDetails(Number.isNaN(cid) ? undefined : cid); @@ -70,11 +68,11 @@ export function ShowCashoutDetails({ id, routeClose }: Props): VNode { ); case HttpStatusCode.NotImplemented: return ( - <Attention - type="warning" - title={i18n.str`Cashout are disabled`} - > - <i18n.Translate>Cashout should be enable by configuration and the conversion rate should be initialized with fee, ratio and rounding mode.</i18n.Translate> + <Attention type="warning" title={i18n.str`Cashout are disabled`}> + <i18n.Translate> + Cashout should be enable by configuration and the conversion rate + should be initialized with fee, ratio and rounding mode. + </i18n.Translate> </Attention> ); default: @@ -92,10 +90,11 @@ export function ShowCashoutDetails({ id, routeClose }: Props): VNode { switch (info.case) { case HttpStatusCode.NotImplemented: { return ( - <Attention type="danger" - title={i18n.str`Cashout are disabled`} - > - <i18n.Translate>Cashout should be enable by configuration and the conversion rate should be initialized with fee, ratio and rounding mode.</i18n.Translate> + <Attention type="danger" title={i18n.str`Cashout are disabled`}> + <i18n.Translate> + Cashout should be enable by configuration and the conversion rate + should be initialized with fee, ratio and rounding mode. + </i18n.Translate> </Attention> ); } @@ -134,9 +133,12 @@ export function ShowCashoutDetails({ id, routeClose }: Props): VNode { <i18n.Translate>Created</i18n.Translate> </dt> <dd class="text-sm "> - <Time format="dd/MM/yyyy HH:mm:ss" - timestamp={AbsoluteTime.fromProtocolTimestamp(result.body.creation_time)} - // relative={Duration.fromSpec({ days: 1 })} + <Time + format="dd/MM/yyyy HH:mm:ss" + timestamp={AbsoluteTime.fromProtocolTimestamp( + result.body.creation_time, + )} + // relative={Duration.fromSpec({ days: 1 })} /> </dd> </div> |