diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts b/packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts index 2773e66f7..fd82cde73 100644 --- a/packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts +++ b/packages/taler-wallet-webextension/src/wallet/EmptyComponentExample/index.ts @@ -25,13 +25,9 @@ export interface Props { p: string; } -export type State = - | State.Loading - | State.LoadingUriError - | State.Ready; +export type State = State.Loading | State.LoadingUriError | State.Ready; export namespace State { - export interface Loading { status: "loading"; error: undefined; @@ -54,10 +50,11 @@ export namespace State { const viewMapping: StateViewMap<State> = { loading: Loading, "loading-uri": LoadingUriView, - "ready": ReadyView, + ready: ReadyView, }; - -export const ComponentName = compose("ComponentName", (p: Props) => useComponentState(p, wxApi), viewMapping) - - +export const ComponentName = compose( + "ComponentName", + (p: Props) => useComponentState(p, wxApi), + viewMapping, +); |