summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/components/ExchangeToS.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-11-16 13:59:53 -0300
committerSebastian <sebasjm@gmail.com>2021-11-16 14:01:38 -0300
commita994009d2f094c4d9c12da68dac3abb28bdef4b3 (patch)
treee403a58663f81889982635ffb324f9739e6976b3 /packages/taler-wallet-webextension/src/components/ExchangeToS.tsx
parentc33ed919719845f518d6491ef37df6ae16820dd0 (diff)
downloadwallet-core-a994009d2f094c4d9c12da68dac3abb28bdef4b3.tar.gz
wallet-core-a994009d2f094c4d9c12da68dac3abb28bdef4b3.tar.bz2
wallet-core-a994009d2f094c4d9c12da68dac3abb28bdef4b3.zip
reserveCreated new design
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/ExchangeToS.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/components/ExchangeToS.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/components/ExchangeToS.tsx b/packages/taler-wallet-webextension/src/components/ExchangeToS.tsx
index 6d2731cd8..a71108c50 100644
--- a/packages/taler-wallet-webextension/src/components/ExchangeToS.tsx
+++ b/packages/taler-wallet-webextension/src/components/ExchangeToS.tsx
@@ -13,12 +13,10 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { Fragment, VNode } from "preact";
+import { Fragment, VNode, h } from "preact";
import { useState } from "preact/hooks";
-import { JSXInternal } from "preact/src/jsx";
-import { h } from "preact";
-export function ExchangeXmlTos({ doc }: { doc: Document }) {
+export function ExchangeXmlTos({ doc }: { doc: Document }): VNode {
const termsNode = doc.querySelector("[ids=terms-of-service]");
if (!termsNode) {
return (
@@ -70,7 +68,7 @@ function renderChild(child: Element): VNode {
default:
return (
<div style={{ color: "red", display: "hidden" }}>
- unknown tag {child.nodeName} <a></a>
+ unknown tag {child.nodeName}
</div>
);
}
@@ -81,10 +79,10 @@ function renderChild(child: Element): VNode {
* @returns
*/
function AnchorWithOpenState(
- props: JSXInternal.HTMLAttributes<HTMLAnchorElement>,
-) {
+ props: h.JSX.HTMLAttributes<HTMLAnchorElement>,
+): VNode {
const [open, setOpen] = useState<boolean>(false);
- function doClick(e: JSXInternal.TargetedMouseEvent<HTMLAnchorElement>) {
+ function doClick(e: h.JSX.TargetedMouseEvent<HTMLAnchorElement>): void {
setOpen(!open);
e.preventDefault();
}