Rename config to settings
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
export function loadConfig(path: string): Config | null {
|
export function loadSettings(path: string): Settings | null {
|
||||||
const item = localStorage.getItem(path);
|
const item = localStorage.getItem(path);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return JSON.parse(item) as Config;
|
return JSON.parse(item) as Settings;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Config {
|
export interface Settings {
|
||||||
searchUrl: string;
|
searchUrl: string;
|
||||||
searchBar: boolean,
|
searchBar: boolean,
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user