diff options
author | Florian Dold <florian@dold.me> | 2021-10-21 13:11:17 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-21 13:11:33 +0200 |
commit | 0ee669f52341a8331394a1e9892264c0ef0bb7d7 (patch) | |
tree | 5a4d1a02ad6acd0dd04edde2dc032160c299700f /packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts | |
parent | cf25f5698e9f3a3b36930e545f7cce9829fb08f6 (diff) | |
download | wallet-core-0ee669f52341a8331394a1e9892264c0ef0bb7d7.tar.xz |
reducer WIP, user error boundaries in UI
Diffstat (limited to 'packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts')
-rw-r--r-- | packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts index 4a242a2e5..72594749d 100644 --- a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts +++ b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts @@ -164,10 +164,12 @@ export function useAnastasisReducer(): AnastasisReducerApi { } else { s = await reduceAction(anastasisState.reducerState!, action, args); } - console.log("got new state from reducer", s); + console.log("got response from reducer", s); if (s.code) { + console.log("response is an error"); setAnastasisState({ ...anastasisState, currentError: s }); } else { + console.log("response is a new state"); setAnastasisState({ ...anastasisState, currentError: undefined, |