From 30f86f8748a0d9c23538e972d30270a4f1e83941 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 7 May 2021 10:38:28 -0300
Subject: migrate to preact

---
 .../taler-wallet-webextension/src/pages/reset-required.tsx    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/pages/reset-required.tsx')

diff --git a/packages/taler-wallet-webextension/src/pages/reset-required.tsx b/packages/taler-wallet-webextension/src/pages/reset-required.tsx
index 0ef5fe8b7..7f2676263 100644
--- a/packages/taler-wallet-webextension/src/pages/reset-required.tsx
+++ b/packages/taler-wallet-webextension/src/pages/reset-required.tsx
@@ -20,8 +20,7 @@
  * @author Florian Dold
  */
 
-import * as React from "react";
-
+import { Component, JSX } from "preact";
 import * as wxApi from "../wxApi";
 
 interface State {
@@ -36,7 +35,7 @@ interface State {
   resetRequired: boolean;
 }
 
-class ResetNotification extends React.Component<any, State> {
+class ResetNotification extends Component<any, State> {
   constructor(props: any) {
     super(props);
     this.state = { checked: false, resetRequired: true };
@@ -50,7 +49,7 @@ class ResetNotification extends React.Component<any, State> {
     if (this.state.resetRequired) {
       return (
         <div>
-          <h1>Manual Reset Reqired</h1>
+          <h1>Manual Reset Required</h1>
           <p>
             The wallet&apos;s database in your browser is incompatible with the{" "}
             currently installed wallet. Please reset manually.
@@ -63,7 +62,9 @@ class ResetNotification extends React.Component<any, State> {
             id="check"
             type="checkbox"
             checked={this.state.checked}
-            onChange={(e) => this.setState({ checked: e.target.checked })}
+            onChange={() => {
+              this.setState(prev => ({ checked: prev.checked }))
+            }}
           />{" "}
           <label htmlFor="check">
             I understand that I will lose all my data
-- 
cgit v1.2.3

