mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
fix(settings): load network interfaces in allow LAN dialog
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user