diff options
author | Linnea Gräf <nea@nea.moe> | 2025-01-17 16:15:56 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-01-17 16:15:56 +0100 |
commit | d391ce632be29c49a612c64eb5f720238a46844d (patch) | |
tree | a0a8b92c9ec550a5c794fc6edaf9fd71e1621490 /server/frontend/src/Test.tsx | |
parent | aa7e28e799ce19f04c6c33782ea8d25ef4c3bb98 (diff) | |
download | LocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.tar.gz LocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.tar.bz2 LocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.zip |
feat(server): Add all in one http server
Diffstat (limited to 'server/frontend/src/Test.tsx')
-rw-r--r-- | server/frontend/src/Test.tsx | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/server/frontend/src/Test.tsx b/server/frontend/src/Test.tsx index 6eee2d6..15d2f73 100644 --- a/server/frontend/src/Test.tsx +++ b/server/frontend/src/Test.tsx @@ -1,23 +1,31 @@ -import {A, createAsync} from "@solidjs/router"; -import {client} from "./api.js"; -import {For, Suspense} from "solid-js"; +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> + 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> </> -}
\ No newline at end of file + ); +} |