From 9ba0e8597dc0cb902bec3cd8f1090fc5746f790c Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 4 Nov 2021 15:18:30 -0300
Subject: error notifications

---
 packages/anastasis-webui/src/pages/home/SolveScreen.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'packages/anastasis-webui/src/pages/home/SolveScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/SolveScreen.tsx b/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
index df55de6ab..fae1b5631 100644
--- a/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
@@ -6,6 +6,7 @@ import {
   ChallengeFeedbackStatus,
   ChallengeInfo,
 } from "../../../../anastasis-core/lib";
+import { AsyncButton } from "../../components/AsyncButton";
 import { TextInput } from "../../components/fields/TextInput";
 import { useAnastasisContext } from "../../context/anastasis";
 
@@ -106,8 +107,8 @@ export function SolveScreen(): VNode {
       ? SolveUndefinedEntry
       : dialogMap[selectedChallenge.type] ?? SolveUnsupportedEntry;
 
-  function onNext(): void {
-    reducer?.transition("solve_challenge", { answer });
+  async function onNext(): Promise<void> {
+    return reducer?.transition("solve_challenge", { answer });
   }
   function onCancel(): void {
     reducer?.back();
@@ -136,9 +137,9 @@ export function SolveScreen(): VNode {
         <button class="button" onClick={onCancel}>
           Cancel
         </button>
-        <button class="button is-info" onClick={onNext}>
+        <AsyncButton onClick={onNext} disabled={false}>
           Confirm
-        </button>
+        </AsyncButton>
       </div>
     </AnastasisClientFrame>
   );
-- 
cgit v1.2.3

