mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 05:51:56 +08:00
Fix: read general on proxy initial
This commit is contained in:
parent
c14ed17e14
commit
20ce22fba8
@ -95,9 +95,12 @@ function ProxyProviders () {
|
||||
|
||||
function Proxies () {
|
||||
const { proxies } = useProxy()
|
||||
const { update: updateGeneral } = useGeneral()
|
||||
const { useTranslation } = useI18n()
|
||||
const { t } = useTranslation('Proxies')
|
||||
|
||||
useSWR('general', updateGeneral)
|
||||
|
||||
function handleNotitySpeedTest () {
|
||||
EE.notifySpeedTest()
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { atom, useRecoilState, selector } from 'recoil'
|
||||
import get from 'lodash/get'
|
||||
import throttle from 'lodash/throttle'
|
||||
import { useCallback } from 'react'
|
||||
import { AxiosError } from 'axios'
|
||||
|
||||
@ -169,7 +170,7 @@ export function useGeneral () {
|
||||
})
|
||||
}
|
||||
|
||||
return { general: data, update }
|
||||
return { general: data, update: throttle(update, 50) }
|
||||
}
|
||||
|
||||
export const proxies = atom({
|
||||
|
Loading…
x
Reference in New Issue
Block a user