diff options
author | Sebastian <sebasjm@gmail.com> | 2021-05-07 10:38:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-05-07 10:39:49 -0300 |
commit | 30f86f8748a0d9c23538e972d30270a4f1e83941 (patch) | |
tree | fa32280f2d14d0c63c298b042c7b83941fa91e8f /packages/taler-wallet-webextension/src/pages/withdraw.tsx | |
parent | b414de853371b98d125a92a4d9e9578be9b0f0d5 (diff) | |
download | wallet-core-30f86f8748a0d9c23538e972d30270a4f1e83941.tar.xz |
migrate to preact
Diffstat (limited to 'packages/taler-wallet-webextension/src/pages/withdraw.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/pages/withdraw.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/pages/withdraw.tsx b/packages/taler-wallet-webextension/src/pages/withdraw.tsx index c4a02817c..1d628be22 100644 --- a/packages/taler-wallet-webextension/src/pages/withdraw.tsx +++ b/packages/taler-wallet-webextension/src/pages/withdraw.tsx @@ -25,19 +25,20 @@ import * as i18n from "../i18n"; import { renderAmount } from "../renderHtml"; -import React, { useState, useEffect } from "react"; +import { useState, useEffect } from "preact/hooks"; import { acceptWithdrawal, onUpdateNotification, getWithdrawalDetailsForUri, } from "../wxApi"; import { WithdrawUriInfoResponse } from "@gnu-taler/taler-util"; +import { JSX } from "preact/jsx-runtime"; function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element { - const [details, setDetails] = useState<WithdrawUriInfoResponse | undefined>(); + const [details, setDetails] = useState<WithdrawUriInfoResponse | undefined>(undefined); const [selectedExchange, setSelectedExchange] = useState< string | undefined - >(); + >(undefined); const talerWithdrawUri = props.talerWithdrawUri; const [cancelled, setCancelled] = useState(false); const [selecting, setSelecting] = useState(false); @@ -48,7 +49,6 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element { return onUpdateNotification(() => { setUpdateCounter(updateCounter + 1); }); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { |