chore: clean up unused files and empty code blocks

This commit is contained in:
Wikid82
2025-11-26 01:12:52 +00:00
parent 4f03021c9c
commit 56903b0e06
14 changed files with 174 additions and 46 deletions
+4 -4
View File
@@ -1,16 +1,16 @@
import { useQuery } from '@tanstack/react-query'
import { dockerApi } from '../api/docker'
export function useDocker(host?: string | null) {
export function useDocker(host?: string | null, serverId?: string | null) {
const {
data: containers = [],
isLoading,
error,
refetch,
} = useQuery({
queryKey: ['docker-containers', host],
queryFn: () => dockerApi.listContainers(host || undefined),
enabled: host !== null, // Disable if host is explicitly null
queryKey: ['docker-containers', host, serverId],
queryFn: () => dockerApi.listContainers(host || undefined, serverId || undefined),
enabled: host !== null || serverId !== null, // Disable if both are explicitly null/undefined
retry: 1, // Don't retry too much if docker is not available
})