Files
Homarr/tools/settings.ts
Thomas "ajnart" Camlong 61df004ace Rename config to settings
2022-04-30 21:34:28 +02:00

17 lines
302 B
TypeScript

export function loadSettings(path: string): Settings | null {
const item = localStorage.getItem(path);
if (!item) {
return null;
}
try {
return JSON.parse(item) as Settings;
} catch (e) {
return null;
}
}
export interface Settings {
searchUrl: string;
searchBar: boolean,
}