From 6f148df84dfe5d0d0d1c6a0614f86e374fc8d1aa Mon Sep 17 00:00:00 2001
From: Linnea Gräf <nea@nea.moe>
Date: Wed, 22 Jan 2025 01:10:10 +0100
Subject: feat(server): Add first analysis

---
 server/frontend/src/App.tsx | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

(limited to 'server/frontend/src/App.tsx')

diff --git a/server/frontend/src/App.tsx b/server/frontend/src/App.tsx
index e35bb42..bdc1007 100644
--- a/server/frontend/src/App.tsx
+++ b/server/frontend/src/App.tsx
@@ -1,11 +1,20 @@
-import type { Component } from "solid-js";
-import { A } from "@solidjs/router";
+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 (
     <>
-      Hello World
-      <A href="/test">Test Page</A>
+      <Suspense fallback="Loading analysis...">
+        <ul>
+          <For each={analysis()?.data}>
+            {item =>
+              <li><A href={`/analysis/${item.id}`}>{item.name}</A></li>
+            }
+          </For>
+        </ul>
+      </Suspense>
     </>
   );
 };
-- 
cgit 

