diff options
Diffstat (limited to 'packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx')
-rw-r--r-- | packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx b/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx index 04556696b..70e41bf1e 100644 --- a/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx +++ b/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx @@ -16,7 +16,7 @@ import { HttpStatusCode, TalerError, - assertUnreachable + assertUnreachable, } from "@gnu-taler/taler-util"; import { Attention, @@ -34,6 +34,7 @@ interface Props { onCompleted?: () => void; onChangeLeft?: () => void; onNoMoreChanges?: () => void; + onNoInfo: () => void; } export function CheckChallengeIsUpToDate({ sessionId: sessionFromParam, @@ -42,6 +43,7 @@ export function CheckChallengeIsUpToDate({ onCompleted, onChangeLeft, onNoMoreChanges, + onNoInfo, }: Props): VNode { const { state, updateStatus } = useSessionState(); const { i18n } = useTranslationContext(); @@ -57,12 +59,17 @@ export function CheckChallengeIsUpToDate({ }; const result = useChallengeSession(nonce, sessionId); + console.log("asd"); + if (!sessionId) { + onNoInfo(); + return <Loading />; + } if (!result) { return <Loading />; } if (result instanceof TalerError) { - return <div />; + return <pre>{JSON.stringify(result, undefined, 2)}</pre>; } if (result.type === "fail") { |