From 20c3d4ef149268887107ddcc2b20a84db363dee6 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 18 May 2023 12:48:01 -0300
Subject: add routing

---
 .../exchange-backoffice-ui/src/pages/ShowForm.tsx    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 packages/exchange-backoffice-ui/src/pages/ShowForm.tsx

(limited to 'packages/exchange-backoffice-ui/src/pages/ShowForm.tsx')

diff --git a/packages/exchange-backoffice-ui/src/pages/ShowForm.tsx b/packages/exchange-backoffice-ui/src/pages/ShowForm.tsx
new file mode 100644
index 000000000..5440ab7e1
--- /dev/null
+++ b/packages/exchange-backoffice-ui/src/pages/ShowForm.tsx
@@ -0,0 +1,20 @@
+import { h } from "preact";
+import { allForms } from "../Dashboard.js";
+import { NiceForm } from "../NiceForm.js";
+
+export function ShowForm({ number }: { number?: string }) {
+  const selectedForm = Number.parseInt(number ?? "0", 10);
+  if (Number.isNaN(selectedForm)) {
+    return <div>WHAT! {number}</div>;
+  }
+  const showingFrom = allForms[selectedForm].impl;
+  const storedValue = {
+    fullName: "loggedIn_user_fullname",
+    when: {
+      t_ms: new Date().getTime(),
+    },
+  };
+  return (
+    <NiceForm initial={storedValue} form={showingFrom} onUpdate={() => {}} />
+  );
+}
-- 
cgit v1.2.3

