diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-14 15:20:32 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-14 15:21:24 -0300 |
commit | 08959f83bc9f6d5df93cb6c2d34b671bf419d05a (patch) | |
tree | 1a366b05453de18b598c9a587caea7ba6d1c93e7 /packages/taler-wallet-webextension/src/cta/Withdraw.tsx | |
parent | 1d7c8f7083f2aa98295f1ad28399c8e19a9e7754 (diff) | |
download | wallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.tar.xz |
take translator from transaltion context
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index 7c9745ddc..8535c67eb 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -25,7 +25,6 @@ import { AmountJson, Amounts, ExchangeListItem, - i18n, Translate, WithdrawUriInfoResponse, } from "@gnu-taler/taler-util"; @@ -52,6 +51,7 @@ import { } from "../utils/index"; import * as wxApi from "../wxApi"; import { TermsOfServiceSection } from "./TermsOfServiceSection"; +import { useTranslationContext } from "../context/translation"; interface Props { talerWithdrawUri?: string; @@ -84,6 +84,7 @@ export function View({ onAccept, reviewed, }: ViewProps): VNode { + const { i18n } = useTranslationContext(); const [withdrawError, setWithdrawError] = useState< OperationFailedError | undefined >(undefined); @@ -236,12 +237,10 @@ export function WithdrawPageWithParsedURI({ uri: string; uriInfo: WithdrawUriInfoResponse; }): VNode { + const { i18n } = useTranslationContext(); const [customExchange, setCustomExchange] = useState<string | undefined>( undefined, ); - // const [errorAccepting, setErrorAccepting] = useState<string | undefined>( - // undefined, - // ); const [reviewing, setReviewing] = useState<boolean>(false); const [reviewed, setReviewed] = useState<boolean>(false); @@ -332,6 +331,7 @@ export function WithdrawPageWithParsedURI({ ); } export function WithdrawPage({ talerWithdrawUri }: Props): VNode { + const { i18n } = useTranslationContext(); const uriInfoHook = useAsyncAsHook(() => !talerWithdrawUri ? Promise.reject(undefined) |