forked from MapComplete/MapComplete
Add dynamic loading of userLayout from localStorage
This commit is contained in:
parent
b4f95e5408
commit
58d6903ec5
3 changed files with 16 additions and 8 deletions
|
@ -3,10 +3,7 @@ import {UIEventSource} from "../UIEventSource";
|
|||
export class LocalStorageSource {
|
||||
|
||||
static Get(key: string, defaultValue: string = undefined): UIEventSource<string> {
|
||||
|
||||
try {
|
||||
|
||||
|
||||
const saved = localStorage.getItem(key);
|
||||
const source = new UIEventSource<string>(saved ?? defaultValue);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue