Fixed 'none' profile
This commit is contained in:
parent
960923de40
commit
fc5ef5da5a
2 changed files with 4 additions and 2 deletions
|
|
@ -6,7 +6,10 @@ const DebugSettings = ({ type, title, ip, profile, setProfile }) => {
|
||||||
const [value, setValue] = useState('')
|
const [value, setValue] = useState('')
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (profile === 'match') {
|
if (profile === 'none') {
|
||||||
|
setValue('')
|
||||||
|
chrome.storage.sync.set({ [type]: '' })
|
||||||
|
} else if (profile === 'match') {
|
||||||
if (ip) {
|
if (ip) {
|
||||||
const ipTypeValue =
|
const ipTypeValue =
|
||||||
type === 'locale' ? countryLocales[ip.countryCode].locale : ip[type]
|
type === 'locale' ? countryLocales[ip.countryCode].locale : ip[type]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
const profiles = {
|
const profiles = {
|
||||||
none: { timezone: '', locale: '', lat: '', lon: '' },
|
|
||||||
baghdad: {
|
baghdad: {
|
||||||
name: 'Baghdad',
|
name: 'Baghdad',
|
||||||
timezone: 'Asia/Baghdad',
|
timezone: 'Asia/Baghdad',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue