fix(settings): load network interfaces in allow LAN dialog

This commit is contained in:
Tunglies
2026-05-24 15:41:15 +08:00
parent aa478bfe1a
commit 2a397d7ef6
2 changed files with 43 additions and 55 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ export const useNetworkInterfaces = () => {
const {
data,
error,
isFetching,
isLoading,
refetch: mutate,
} = useQuery({
@@ -13,12 +14,12 @@ export const useNetworkInterfaces = () => {
queryFn: getNetworkInterfacesInfo,
refetchOnWindowFocus: false,
refetchOnReconnect: false,
initialData: [],
placeholderData: [],
})
return {
networkInterfaces: data || [],
loading: isLoading,
loading: isLoading || isFetching,
error,
mutate,
}