mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
refactor: migrate query cache to swr
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import dayjs from 'dayjs'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { MihomoWebSocket, type LogLevel } from 'tauri-plugin-mihomo-api'
|
||||
|
||||
import { getClashLogs } from '@/services/cmds'
|
||||
import { queryClient } from '@/services/query-client'
|
||||
|
||||
import { useClashLog } from './use-clash-log'
|
||||
import { useMihomoWsSubscription } from './use-mihomo-ws-subscription'
|
||||
@@ -48,7 +48,6 @@ const appendLogs = (
|
||||
}
|
||||
|
||||
export const useLogData = () => {
|
||||
const queryClient = useQueryClient()
|
||||
const [clashLog] = useClashLog()
|
||||
const enableLog = clashLog.enable
|
||||
const logLevel = clashLog.logLevel.toUpperCase() as LogLevel
|
||||
|
||||
Reference in New Issue
Block a user