fix(ui): re-enable machine state query but disable polling
This commit is contained in:
@@ -152,8 +152,6 @@ export const useMachineStateQuery = (clanURI: string, machineName: string) => {
|
|||||||
const client = useApiClient();
|
const client = useApiClient();
|
||||||
return useQuery<MachineState>(() => ({
|
return useQuery<MachineState>(() => ({
|
||||||
queryKey: [...machineKey(clanURI, machineName), "state"],
|
queryKey: [...machineKey(clanURI, machineName), "state"],
|
||||||
staleTime: 60_000, // 1 minute stale time
|
|
||||||
enabled: false,
|
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const apiCall = client.fetch("get_machine_state", {
|
const apiCall = client.fetch("get_machine_state", {
|
||||||
machine: {
|
machine: {
|
||||||
|
|||||||
Reference in New Issue
Block a user