aboutsummaryrefslogtreecommitdiff
path: root/packages/challenger-ui/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/challenger-ui/src/components')
-rw-r--r--packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx b/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx
index 8ceb969b5..fecb36cbb 100644
--- a/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx
+++ b/packages/challenger-ui/src/components/CheckChallengeIsUpToDate.tsx
@@ -28,7 +28,7 @@ import { useChallengeSession } from "../hooks/challenge.js";
import { SessionId, useSessionState } from "../hooks/session.js";
interface Props {
- session?: SessionId | undefined;
+ session: SessionId;
children: ComponentChildren;
onCompleted?: () => void;
onChangeLeft?: () => void;
@@ -44,9 +44,7 @@ export function CheckChallengeIsUpToDate({
const { state } = useSessionState();
const { i18n } = useTranslationContext();
- const id = session ?? state;
-
- const result = useChallengeSession(id);
+ const result = useChallengeSession(session);
if (!result) {
return <Loading />;
@@ -103,7 +101,7 @@ export function CheckChallengeIsUpToDate({
</Attention>
<div class="mt-2">
- <a href={id?.redirectURL ?? ""}>{id?.redirectURL}</a>
+ <a href={session.redirectURL ?? ""}>{session.redirectURL}</a>
</div>
</Fragment>
);