From af7b107f455b01e136db2211c357cc59a506139a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Jun 2022 15:47:47 -0300 Subject: mui button impl --- packages/taler-wallet-webextension/src/context/devContext.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-webextension/src/context') diff --git a/packages/taler-wallet-webextension/src/context/devContext.ts b/packages/taler-wallet-webextension/src/context/devContext.ts index 1ce483d8d..ec79f22d8 100644 --- a/packages/taler-wallet-webextension/src/context/devContext.ts +++ b/packages/taler-wallet-webextension/src/context/devContext.ts @@ -25,11 +25,11 @@ import { useLocalStorage } from "../hooks/useLocalStorage.js"; interface Type { devMode: boolean; - toggleDevMode: () => void; + toggleDevMode: () => Promise; } const Context = createContext({ devMode: false, - toggleDevMode: () => null, + toggleDevMode: async () => { return; }, }); export const useDevContext = (): Type => useContext(Context); @@ -44,8 +44,8 @@ export const DevContextProviderForTesting = ({ return h(Context.Provider, { value: { devMode: value, - toggleDevMode: () => { - null; + toggleDevMode: async () => { + return; }, }, children, @@ -55,7 +55,7 @@ export const DevContextProviderForTesting = ({ export const DevContextProvider = ({ children }: { children: any }): VNode => { const [value, setter] = useLocalStorage("devMode"); const devMode = value === "true"; - const toggleDevMode = (): void => setter((v) => (!v ? "true" : undefined)); + const toggleDevMode = async (): Promise => setter((v) => (!v ? "true" : undefined)); children = children.length === 1 && typeof children === "function" ? children({ devMode }) -- cgit v1.2.3