diff --git a/web/src/App.tsx b/web/src/App.tsx index 6565a79..69cc9a6 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -50,6 +50,36 @@ function LinkList({ links }: { links: Link[] }) { ); } +function ServiceList({ + services, + refresh, +}: { + services: Service[]; + refresh: () => void; +}) { + const [searchQuery, setSearchQuery] = useState(""); + + const filteredServices = services.filter((s) => + s.name.toLowerCase().includes(searchQuery.toLowerCase()), + ); + return ( +
+ setSearchQuery(e.currentTarget.value)} + /> +
+ {filteredServices.map((s) => ( + + ))} +
+
+ ); +} + export function App() { const [content, setContent] = useState<{ links: Link[]; @@ -135,14 +165,7 @@ export function App() { )} {category === "exec" && content.exec.map((it) => )} {category === "services" && ( -
- -
- {content.services.map((s) => ( - - ))} -
-
+ )} {category === "docs" && (open ? (