aboutsummaryrefslogtreecommitdiff
path: root/server/frontend/src/Test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/frontend/src/Test.tsx')
-rw-r--r--server/frontend/src/Test.tsx31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/frontend/src/Test.tsx b/server/frontend/src/Test.tsx
new file mode 100644
index 0000000..15d2f73
--- /dev/null
+++ b/server/frontend/src/Test.tsx
@@ -0,0 +1,31 @@
+import { A, createAsync } from "@solidjs/router";
+import { client } from "./api.js";
+import { For, Suspense } from "solid-js";
+
+export default function Test() {
+ let items = createAsync(() =>
+ client.GET("/item", {
+ params: {
+ query: {
+ itemId: ["HYPERION", "BAT_WAND"],
+ },
+ },
+ })
+ );
+ return (
+ <>
+ Test page <A href={"/"}>Back to main</A>
+ <hr />
+ <Suspense fallback={"Loading items..."}>
+ <p>Here are all Items:</p>
+ <For each={Object.entries(items()?.data || {})}>
+ {([id, name]) => (
+ <li>
+ <code>{id}</code>: {name}
+ </li>
+ )}
+ </For>
+ </Suspense>
+ </>
+ );
+}