From fc5ef5da5adc989d241253f69fd977891b6fbd3a Mon Sep 17 00:00:00 2001 From: z0ccc Date: Thu, 12 May 2022 20:14:41 -0400 Subject: [PATCH] Fixed 'none' profile --- src/pages/Popup/DebugSettings.js | 5 ++++- src/utils/profiles.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/Popup/DebugSettings.js b/src/pages/Popup/DebugSettings.js index d01ed77..e045bec 100644 --- a/src/pages/Popup/DebugSettings.js +++ b/src/pages/Popup/DebugSettings.js @@ -6,7 +6,10 @@ const DebugSettings = ({ type, title, ip, profile, setProfile }) => { const [value, setValue] = useState('') useEffect(() => { - if (profile === 'match') { + if (profile === 'none') { + setValue('') + chrome.storage.sync.set({ [type]: '' }) + } else if (profile === 'match') { if (ip) { const ipTypeValue = type === 'locale' ? countryLocales[ip.countryCode].locale : ip[type] diff --git a/src/utils/profiles.js b/src/utils/profiles.js index 4ea74dd..235715e 100644 --- a/src/utils/profiles.js +++ b/src/utils/profiles.js @@ -1,5 +1,4 @@ const profiles = { - none: { timezone: '', locale: '', lat: '', lon: '' }, baghdad: { name: 'Baghdad', timezone: 'Asia/Baghdad',