From 0b4976601fe2ecb0462fe72ae188b5cbba06d9cc Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 16 Jun 2021 18:21:03 -0300
Subject: components renaming to follow react pattern

---
 .../src/hooks/useExtendedPermissions.tsx           | 24 ----------------------
 1 file changed, 24 deletions(-)
 delete mode 100644 packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.tsx

(limited to 'packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.tsx')

diff --git a/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.tsx b/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.tsx
deleted file mode 100644
index f5c788cf6..000000000
--- a/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useState, useEffect } from "preact/hooks";
-import * as wxApi from "../wxApi";
-import { handleExtendedPerm } from "../wallet/welcome";
-
-
-export function useExtendedPermissions(): [boolean, () => void] {
-  const [enabled, setEnabled] = useState(false);
-
-  const toggle = () => {
-    setEnabled(v => !v);
-    handleExtendedPerm(enabled).then(result => {
-      setEnabled(result);
-    });
-  };
-
-  useEffect(() => {
-    async function getExtendedPermValue(): Promise<void> {
-      const res = await wxApi.getExtendedPermissions();
-      setEnabled(res.newValue);
-    }
-    getExtendedPermValue();
-  }, []);
-  return [enabled, toggle];
-}
-- 
cgit v1.2.3

