🛠 Fix JWT loading for shared view (#76)
* Fix JWT loading * Use a different local storage for shared view
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user