Commit 8: Plugin-System (Scanner erweitern, Geräte importieren, Icons)

This commit is contained in:
2026-07-19 10:14:43 +02:00
parent 6a7eb3dfe5
commit 986de50963
20 changed files with 517 additions and 20 deletions

View File

@@ -0,0 +1,17 @@
import { useQuery } from "@tanstack/react-query";
import type { PluginInfo } from "@launchpad/shared";
async function fetchPlugins(): Promise<PluginInfo[]> {
const res = await fetch("/api/plugins");
if (!res.ok) {
throw new Error(`Plugins konnten nicht geladen werden (HTTP ${res.status})`);
}
return res.json();
}
export function usePlugins() {
return useQuery({
queryKey: ["plugins"],
queryFn: fetchPlugins,
});
}