mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
refactor: reduce browser storage dependence, remove unused code
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import browser from 'webextension-polyfill';
|
||||
import localforage from 'localforage';
|
||||
import { CustomTheme, ThemeList } from '../../../interface/types/CustomThemes';
|
||||
import { blobToBase64 } from '../../utils/blobToBase64';
|
||||
|
||||
import { settingsState } from '../../utils/listeners/SettingsState';
|
||||
|
||||
export const getAvailableThemes = async (): Promise<ThemeList | {}> => {
|
||||
try {
|
||||
@@ -19,9 +18,7 @@ export const getAvailableThemes = async (): Promise<ThemeList | {}> => {
|
||||
})
|
||||
);
|
||||
|
||||
const selectedTheme = await browser.storage.local.get('selectedTheme') as { selectedTheme: string; };
|
||||
|
||||
return { themes, selectedTheme: selectedTheme.selectedTheme ? selectedTheme.selectedTheme : '' };
|
||||
return { themes, selectedTheme: settingsState.selectedTheme ? settingsState.selectedTheme : '' };
|
||||
}
|
||||
return {
|
||||
themes: [],
|
||||
|
||||
Reference in New Issue
Block a user