fix a little

This commit is contained in:
pompurin404 2024-08-30 11:04:39 +08:00
parent 716ed4ff50
commit fccd50dc0a
No known key found for this signature in database
5 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ const DNSCard: React.FC = () => {
const navigate = useNavigate() const navigate = useNavigate()
const location = useLocation() const location = useLocation()
const match = location.pathname.includes('/dns') const match = location.pathname.includes('/dns')
const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig(true) const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig()
const { dns, tun } = controledMihomoConfig || {} const { dns, tun } = controledMihomoConfig || {}
const { enable = true } = dns || {} const { enable = true } = dns || {}
const { const {

View File

@ -5,7 +5,7 @@ import { mihomoCloseAllConnections, patchMihomoConfig } from '@renderer/utils/ip
import { Key } from 'react' import { Key } from 'react'
const OutboundModeSwitcher: React.FC = () => { const OutboundModeSwitcher: React.FC = () => {
const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig(true) const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig()
const { appConfig } = useAppConfig() const { appConfig } = useAppConfig()
const { autoCloseConnection = true } = appConfig || {} const { autoCloseConnection = true } = appConfig || {}
const { mode } = controledMihomoConfig || {} const { mode } = controledMihomoConfig || {}

View File

@ -11,7 +11,7 @@ const SniffCard: React.FC = () => {
const navigate = useNavigate() const navigate = useNavigate()
const location = useLocation() const location = useLocation()
const match = location.pathname.includes('/sniffer') const match = location.pathname.includes('/sniffer')
const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig(true) const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig()
const { sniffer } = controledMihomoConfig || {} const { sniffer } = controledMihomoConfig || {}
const { enable } = sniffer || {} const { enable } = sniffer || {}
const { const {

View File

@ -12,7 +12,7 @@ const SysproxySwitcher: React.FC = () => {
const navigate = useNavigate() const navigate = useNavigate()
const location = useLocation() const location = useLocation()
const match = location.pathname.includes('/sysproxy') const match = location.pathname.includes('/sysproxy')
const { appConfig, patchAppConfig } = useAppConfig(true) const { appConfig, patchAppConfig } = useAppConfig()
const { sysProxy } = appConfig || {} const { sysProxy } = appConfig || {}
const { enable } = sysProxy || {} const { enable } = sysProxy || {}
const { const {

View File

@ -17,7 +17,7 @@ const TunSwitcher: React.FC = () => {
const match = location.pathname.includes('/tun') || false const match = location.pathname.includes('/tun') || false
const [openPasswordModal, setOpenPasswordModal] = useState(false) const [openPasswordModal, setOpenPasswordModal] = useState(false)
const { appConfig, patchAppConfig } = useAppConfig() const { appConfig, patchAppConfig } = useAppConfig()
const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig(true) const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig()
const { tun } = controledMihomoConfig || {} const { tun } = controledMihomoConfig || {}
const { enable } = tun || {} const { enable } = tun || {}
const { const {