mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
* refactor: unify backend and frontend servers * refactor: correct paths for openapi & drizzle * refactor: move api-client to client * fix: drizzle paths * chore: fix linting issues * fix: form reset issue
19 lines
462 B
TypeScript
19 lines
462 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { getSystemInfoOptions } from "../api-client/@tanstack/react-query.gen";
|
|
|
|
export function useSystemInfo() {
|
|
const { data, isLoading, error } = useQuery({
|
|
...getSystemInfoOptions(),
|
|
staleTime: 5 * 60 * 1000,
|
|
gcTime: 10 * 60 * 1000,
|
|
refetchOnWindowFocus: false,
|
|
});
|
|
|
|
return {
|
|
capabilities: data?.capabilities ?? { docker: false, rclone: false },
|
|
isLoading,
|
|
error,
|
|
systemInfo: data,
|
|
};
|
|
}
|