diff options
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx index 058efe009..bc0b67dcb 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.tsx @@ -9,6 +9,7 @@ import { TextInput } from "../../../components/fields/TextInput"; import { useAnastasisContext } from "../../../context/anastasis"; import { AnastasisClientFrame } from "../index"; import { SolveOverviewFeedbackDisplay } from "../SolveScreen"; +import { shouldHideConfirm } from "./helpers"; import { AuthMethodSolveProps } from "./index"; export function AuthMethodQuestionSolve({ id }: AuthMethodSolveProps): VNode { @@ -79,12 +80,6 @@ export function AuthMethodQuestionSolve({ id }: AuthMethodSolveProps): VNode { reducer?.back(); } - const shouldHideConfirm = - feedback?.state === ChallengeFeedbackStatus.RateLimitExceeded || - feedback?.state === ChallengeFeedbackStatus.Redirect || - feedback?.state === ChallengeFeedbackStatus.Unsupported || - feedback?.state === ChallengeFeedbackStatus.TruthUnknown; - return ( <AnastasisClientFrame hideNav title="Question challenge"> <SolveOverviewFeedbackDisplay feedback={feedback} /> @@ -110,7 +105,7 @@ export function AuthMethodQuestionSolve({ id }: AuthMethodSolveProps): VNode { <button class="button" onClick={onCancel}> Cancel </button> - {!shouldHideConfirm && ( + {!shouldHideConfirm(feedback) && ( <AsyncButton class="button is-info" onClick={onNext}> Confirm </AsyncButton> |