diff options
Diffstat (limited to 'server/frontend/src/App.tsx')
-rw-r--r-- | server/frontend/src/App.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/frontend/src/App.tsx b/server/frontend/src/App.tsx new file mode 100644 index 0000000..bdc1007 --- /dev/null +++ b/server/frontend/src/App.tsx @@ -0,0 +1,22 @@ +import { For, Suspense, type Component } from "solid-js"; +import { A, createAsync } from "@solidjs/router"; +import { client, getAnalysisList } from "./api.ts"; + +const App: Component = () => { + let analysis = createAsync(() => getAnalysisList()); + return ( + <> + <Suspense fallback="Loading analysis..."> + <ul> + <For each={analysis()?.data}> + {item => + <li><A href={`/analysis/${item.id}`}>{item.name}</A></li> + } + </For> + </ul> + </Suspense> + </> + ); +}; + +export default App; |