refactor: migrate query cache to swr

This commit is contained in:
Tunglies
2026-06-28 19:39:15 +08:00
parent 294955cb8c
commit e71e701fd0
18 changed files with 213 additions and 58 deletions
+1 -1
View File
@@ -5,7 +5,6 @@ import {
VisibilityOutlined,
} from '@mui/icons-material'
import { Box, Button, IconButton, Skeleton, Typography } from '@mui/material'
import { useQuery } from '@tanstack/react-query'
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
import { useEffect } from 'foxact/use-abortable-effect'
import { useIntersection } from 'foxact/use-intersection'
@@ -21,6 +20,7 @@ import {
import { useTranslation } from 'react-i18next'
import { getIpInfo } from '@/services/api'
import { useQuery } from '@/services/query-client'
import { EnhancedCard } from './enhanced-card'
+1 -1
View File
@@ -10,7 +10,6 @@ import {
Typography,
} from '@mui/material'
import { useTheme } from '@mui/material/styles'
import { useQuery } from '@tanstack/react-query'
import { defaultRangeExtractor, useVirtualizer } from '@tanstack/react-virtual'
import { useLockFn } from 'ahooks'
import {
@@ -34,6 +33,7 @@ import { useVerge } from '@/hooks/use-verge'
import { useProxiesData } from '@/providers/app-data-context'
import { calcuProxies, updateProxyChainConfigInRuntime } from '@/services/cmds'
import delayManager from '@/services/delay'
import { useQuery } from '@/services/query-client'
import { debugLog } from '@/utils/debug'
import { ScrollTopButton } from '../layout/scroll-top-button'