diff options
author | Sebastian <sebasjm@gmail.com> | 2022-06-06 00:04:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-06-06 00:04:53 -0300 |
commit | e3c92b6080f4b2c7f146bd84953ef51114b23cdb (patch) | |
tree | 72391332d5a949bf2c7009d56ad633f3d4c1a30e /packages/anastasis-webui/src/utils | |
parent | 1c1384d7c8193aa17375e630a960644f669d2b48 (diff) | |
download | wallet-core-e3c92b6080f4b2c7f146bd84953ef51114b23cdb.tar.gz wallet-core-e3c92b6080f4b2c7f146bd84953ef51114b23cdb.tar.bz2 wallet-core-e3c92b6080f4b2c7f146bd84953ef51114b23cdb.zip |
updating package
Diffstat (limited to 'packages/anastasis-webui/src/utils')
-rw-r--r-- | packages/anastasis-webui/src/utils/index.tsx | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/packages/anastasis-webui/src/utils/index.tsx b/packages/anastasis-webui/src/utils/index.tsx index 2e502cacb..a59b19323 100644 --- a/packages/anastasis-webui/src/utils/index.tsx +++ b/packages/anastasis-webui/src/utils/index.tsx @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/camelcase */ import { - AuthenticationProviderStatus, AuthenticationProviderStatusError, AuthenticationProviderStatusOk, BackupStates, @@ -9,7 +7,11 @@ import { ReducerStateRecovery, } from "@gnu-taler/anastasis-core"; import { FunctionalComponent, h, VNode } from "preact"; -import { AnastasisProvider } from "../context/anastasis"; +import { AnastasisProvider } from "../context/anastasis.js"; + +const noop = async (): Promise<void> => { + return; +}; export function createExample<Props>( Component: FunctionalComponent<Props>, @@ -21,39 +23,23 @@ export function createExample<Props>( <AnastasisProvider value={{ currentReducerState, - discoverMore: async () => {}, - discoverStart: async () => {}, + discoverMore: noop, + discoverStart: noop, discoveryState: { state: "none", }, currentError: undefined, - back: async () => { - null; - }, - dismissError: async () => { - null; - }, - reset: () => { - null; - }, - runTransaction: async () => { - null; - }, - startBackup: () => { - null; - }, - startRecover: () => { - null; - }, - transition: async () => { - null; - }, + back: noop, + dismissError: noop, + reset: noop, + runTransaction: noop, + startBackup: noop, + startRecover: noop, + transition: noop, exportState: () => { return "{}"; }, - importState(s: string) { - /* do nothing */ - }, + importState: noop, }} > <Component {...args} /> |