🛠 Fix JWT loading for shared view (#76)

* Fix JWT loading
* Use a different local storage for shared view
This commit is contained in:
Romaric Mourgues
2023-06-12 11:00:20 +02:00
committed by GitHub
parent 723b77cb55
commit b7b9abbc97
4 changed files with 29 additions and 13 deletions
@@ -1,6 +1,11 @@
export default class LocalStorage {
static prefix = 'tdrive:';
//For shared views we will use another prefix
static setPrefix(prefix: string) {
LocalStorage.prefix = prefix;
}
static setItem(key: string, value: unknown) {
window.localStorage.setItem(`${LocalStorage.prefix}${key}`, JSON.stringify(value));
}