Custom profile not updating in current tab

This commit is contained in:
z0ccc 2022-06-20 01:37:12 -04:00
parent 867ecc590d
commit 588389fc75

View file

@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import profiles from '../../utils/profiles' import profiles from '../../utils/profiles'
import countryLocales from '../../utils/countryLocales' import countryLocales from '../../utils/countryLocales'
import detachDebugger from '../../utils/detachDebugger'
const DebugSettings = ({ type, title, ip, profile, setProfile }) => { const DebugSettings = ({ type, title, ip, profile, setProfile }) => {
const [value, setValue] = useState('') const [value, setValue] = useState('')
@ -27,6 +28,7 @@ const DebugSettings = ({ type, title, ip, profile, setProfile }) => {
}, [ip, profile, type, value]) }, [ip, profile, type, value])
const changeTextValue = (e) => { const changeTextValue = (e) => {
detachDebugger()
chrome.storage.sync.set({ [type]: e.target.value }) chrome.storage.sync.set({ [type]: e.target.value })
setValue(e.target.value) setValue(e.target.value)
chrome.storage.sync.set({ profile: 'custom' }) chrome.storage.sync.set({ profile: 'custom' })