summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Notifications/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Notifications/index.ts')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Notifications/index.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Notifications/index.ts b/packages/taler-wallet-webextension/src/wallet/Notifications/index.ts
index 253a0e629..22b3adb0f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Notifications/index.ts
+++ b/packages/taler-wallet-webextension/src/wallet/Notifications/index.ts
@@ -15,14 +15,14 @@
*/
import { UserAttentionUnreadList } from "@gnu-taler/taler-util";
+import { ErrorAlertView } from "../../components/CurrentAlerts.js";
import { Loading } from "../../components/Loading.js";
-import { HookError } from "../../hooks/useAsyncAsHook.js";
+import { ErrorAlert } from "../../context/alert.js";
import { compose, StateViewMap } from "../../utils/index.js";
-import { wxApi } from "../../wxApi.js";
import { useComponentState } from "./state.js";
-import { LoadingUriView, ReadyView } from "./views.js";
+import { ReadyView } from "./views.js";
-export interface Props {}
+export type Props = object;
export type State = State.Loading | State.LoadingUriError | State.Ready;
@@ -33,8 +33,8 @@ export namespace State {
}
export interface LoadingUriError {
- status: "loading-error";
- error: HookError;
+ status: "error";
+ error: ErrorAlert;
}
export interface BaseInfo {
@@ -50,12 +50,12 @@ export namespace State {
const viewMapping: StateViewMap<State> = {
loading: Loading,
- "loading-error": LoadingUriView,
+ error: ErrorAlertView,
ready: ReadyView,
};
export const NotificationsPage = compose(
"NotificationsPage",
- (p: Props) => useComponentState(p, wxApi),
+ (p: Props) => useComponentState(p),
viewMapping,
);