mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Chore: remove unused code
This commit is contained in:
parent
213c5dabe3
commit
760f0fda72
@ -3,7 +3,7 @@ import * as Models from '@models'
|
|||||||
import { createContainer } from 'unstated-next'
|
import { createContainer } from 'unstated-next'
|
||||||
import * as API from '@lib/request'
|
import * as API from '@lib/request'
|
||||||
import { useObject } from '@lib/hook'
|
import { useObject } from '@lib/hook'
|
||||||
import { jsBridge, isClashX } from '@lib/jsBridge'
|
import { jsBridge } from '@lib/jsBridge'
|
||||||
import { setLocalStorageItem, partition, to } from '@lib/helper'
|
import { setLocalStorageItem, partition, to } from '@lib/helper'
|
||||||
|
|
||||||
function useData () {
|
function useData () {
|
||||||
@ -65,11 +65,6 @@ function useAPIInfo () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
async function fetch () {
|
async function fetch () {
|
||||||
if (isClashX()) {
|
|
||||||
const apiInfo = await jsBridge.getAPIInfo()
|
|
||||||
set({ hostname: apiInfo.host, port: apiInfo.port, secret: apiInfo.secret })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const info = await API.getExternalControllerConfig()
|
const info = await API.getExternalControllerConfig()
|
||||||
set({ ...info })
|
set({ ...info })
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user