From 21b60c8f6ff69bf114779a767a3ac3355f69a34f Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 26 Oct 2021 12:08:03 -0300
Subject: added core validators, worked on look and feel

---
 .../src/pages/home/ChallengePayingScreen.tsx       | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 packages/anastasis-webui/src/pages/home/ChallengePayingScreen.tsx

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

diff --git a/packages/anastasis-webui/src/pages/home/ChallengePayingScreen.tsx b/packages/anastasis-webui/src/pages/home/ChallengePayingScreen.tsx
new file mode 100644
index 000000000..d87afdf46
--- /dev/null
+++ b/packages/anastasis-webui/src/pages/home/ChallengePayingScreen.tsx
@@ -0,0 +1,33 @@
+import { h, VNode } from "preact";
+import { useAnastasisContext } from "../../context/anastasis";
+import { AnastasisClientFrame } from "./index";
+
+export function ChallengePayingScreen(): VNode {
+  const reducer = useAnastasisContext()
+  if (!reducer) {
+    return <div>no reducer in context</div>
+  }
+  if (!reducer.currentReducerState || reducer.currentReducerState.recovery_state === undefined) {
+    return <div>invalid state</div>
+  }
+  const payments = ['']; //reducer.currentReducerState.payments ?? 
+  return (
+    <AnastasisClientFrame
+      hideNext
+      title="Recovery: Challenge Paying"
+    >
+      <p>
+        Some of the providers require a payment to store the encrypted
+        authentication information.
+      </p>
+      <ul>
+        {payments.map((x, i) => {
+          return <li key={i}>{x}</li>;
+        })}
+      </ul>
+      <button onClick={() => reducer.transition("pay", {})}>
+        Check payment status now
+      </button>
+    </AnastasisClientFrame>
+  );
+}
-- 
cgit v1.2.3

