UI: remove unused inventory.ts file

This commit is contained in:
Johannes Kirschbauer
2025-05-20 13:32:13 +02:00
parent 30e74c408c
commit 463eaff47c

View File

@@ -1,19 +0,0 @@
import { QueryClient } from "@tanstack/solid-query";
import { ApiEnvelope, callApi } from ".";
import { Schema as Inventory } from "@/api/Inventory";
export async function get_inventory(client: QueryClient, base_path: string) {
const data = await client.ensureQueryData({
queryKey: [base_path, "inventory"],
queryFn: () => {
console.log("Refreshing inventory");
return callApi("get_inventory", {
flake: { identifier: base_path },
}) as Promise<ApiEnvelope<Inventory>>;
},
revalidateIfStale: true,
staleTime: 60 * 1000,
});
return data;
}