aboutsummaryrefslogtreecommitdiff
path: root/packages/challenger-ui/src/Routing.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/challenger-ui/src/Routing.tsx')
-rw-r--r--packages/challenger-ui/src/Routing.tsx39
1 files changed, 38 insertions, 1 deletions
diff --git a/packages/challenger-ui/src/Routing.tsx b/packages/challenger-ui/src/Routing.tsx
index eae182be5..f1f4d82d2 100644
--- a/packages/challenger-ui/src/Routing.tsx
+++ b/packages/challenger-ui/src/Routing.tsx
@@ -44,6 +44,10 @@ export function Routing(): VNode {
}
const publicPages = {
+ noinfo: urlPattern<{ nonce: string }>(
+ /\/noinfo\/(?<nonce>[a-zA-Z0-9]+)/,
+ ({ nonce }) => `#/noinfo/${nonce}`,
+ ),
authorize: urlPattern<{ nonce: string }>(
/\/authorize\/(?<nonce>[a-zA-Z0-9]+)/,
({ nonce }) => `#/authorize/${nonce}`,
@@ -93,6 +97,9 @@ function PublicRounting(): VNode {
}
switch (location.name) {
+ case "noinfo": {
+ return <div>no info</div>;
+ }
case "setup": {
return (
<Setup
@@ -137,6 +144,13 @@ function PublicRounting(): VNode {
<CheckChallengeIsUpToDate
sessionId={sessionId}
nonce={location.values.nonce}
+ onNoInfo={() => {
+ navigateTo(
+ publicPages.noinfo.url({
+ nonce: location.values.nonce,
+ }),
+ );
+ }}
onCompleted={() => {
start(sessionId);
navigateTo(
@@ -170,6 +184,13 @@ function PublicRounting(): VNode {
return (
<CheckChallengeIsUpToDate
nonce={location.values.nonce}
+ onNoInfo={() => {
+ navigateTo(
+ publicPages.noinfo.url({
+ nonce: location.values.nonce,
+ }),
+ );
+ }}
onCompleted={() => {
navigateTo(
publicPages.completed.url({
@@ -196,6 +217,13 @@ function PublicRounting(): VNode {
return (
<CheckChallengeIsUpToDate
nonce={location.values.nonce}
+ onNoInfo={() => {
+ navigateTo(
+ publicPages.noinfo.url({
+ nonce: location.values.nonce,
+ }),
+ );
+ }}
onCompleted={() => {
navigateTo(
publicPages.completed.url({
@@ -219,7 +247,16 @@ function PublicRounting(): VNode {
}
case "completed": {
return (
- <CheckChallengeIsUpToDate nonce={location.values.nonce}>
+ <CheckChallengeIsUpToDate
+ nonce={location.values.nonce}
+ onNoInfo={() => {
+ navigateTo(
+ publicPages.noinfo.url({
+ nonce: location.values.nonce,
+ }),
+ );
+ }}
+ >
<CallengeCompleted nonce={location.values.nonce} />
</CheckChallengeIsUpToDate>
);