- improved the system status ui

This commit is contained in:
2025-11-24 14:54:05 +00:00
parent d15a69e6b9
commit c9dde6b992
8 changed files with 152 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
import { useQuery } from "@tanstack/react-query";
const fetchData = async () => {
const response = await fetch(`http://192.168.202.121/api/system-health`);
if (!response.ok) throw new Error("Cannot get System overview");
return response.json();
};
export const useGetSystemHealth = () => {
const query = useQuery({
queryKey: ["fetchSystemData"],
queryFn: fetchData,
});
return { query };
};