diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-23 18:00:42 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-24 17:14:02 -0300 |
commit | 236d4347f5884bb1d9ca1d3bb4ad0ba776577fd2 (patch) | |
tree | a38823a73006c38bd54cb438da81f13bb513dce5 /packages/demobank-ui/src/components/Cashouts/index.ts | |
parent | 579128ce40c7e56f390cadaf2fc2fd4cc6290d68 (diff) | |
download | wallet-core-236d4347f5884bb1d9ca1d3bb4ad0ba776577fd2.tar.xz |
many changes
activate eslint
update file headers
removed history and preact-router
remove eslint errors and more applied prettier
Diffstat (limited to 'packages/demobank-ui/src/components/Cashouts/index.ts')
-rw-r--r-- | packages/demobank-ui/src/components/Cashouts/index.ts | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/packages/demobank-ui/src/components/Cashouts/index.ts b/packages/demobank-ui/src/components/Cashouts/index.ts index 2ee9237f8..2c6bf681c 100644 --- a/packages/demobank-ui/src/components/Cashouts/index.ts +++ b/packages/demobank-ui/src/components/Cashouts/index.ts @@ -15,17 +15,28 @@ */ import { Loading, utils } from "@gnu-taler/web-util/browser"; -import { AbsoluteTime, AmountJson, TalerCoreBankErrorsByMethod, TalerCorebankApi, TalerError } from "@gnu-taler/taler-util"; +import { + AbsoluteTime, + AmountJson, + TalerCoreBankErrorsByMethod, + TalerCorebankApi, + TalerError, +} from "@gnu-taler/taler-util"; import { ErrorLoadingWithDebug } from "../ErrorLoadingWithDebug.js"; import { useComponentState } from "./state.js"; import { FailedView, ReadyView } from "./views.js"; +import { RouteDefinition } from "../../route.js"; export interface Props { account: string; - onSelected: (id: number) => void; + routeCashoutDetails: RouteDefinition<{ cid: string }>; } -export type State = State.Loading | State.Failed | State.LoadingUriError | State.Ready; +export type State = + | State.Loading + | State.Failed + | State.LoadingUriError + | State.Ready; export namespace State { export interface Loading { @@ -50,7 +61,7 @@ export namespace State { status: "ready"; error: undefined; cashouts: (TalerCorebankApi.CashoutStatusResponse & { id: number })[]; - onSelected: (id: number) => void; + routeCashoutDetails: RouteDefinition<{ cid: string }>; } } @@ -65,7 +76,7 @@ export interface Transaction { const viewMapping: utils.StateViewMap<State> = { loading: Loading, "loading-error": ErrorLoadingWithDebug, - "failed": FailedView, + failed: FailedView, ready: ReadyView, }; |