fix: storage key conflict across stages

This commit is contained in:
Carlos Valente
2025-08-15 20:28:36 +02:00
committed by Carlos Valente
parent efceb930e5
commit 617da68ab5
5 changed files with 25 additions and 8 deletions
@@ -1,3 +1,5 @@
import { baseURI } from '../../externals';
export function booleanFromLocalStorage(key: string, fallback: boolean): boolean {
const valueInStorage = localStorage.getItem(key);
if (valueInStorage) {
@@ -7,3 +9,8 @@ export function booleanFromLocalStorage(key: string, fallback: boolean): boolean
return fallback;
}
}
export function makeStageKey(key: string) {
if (baseURI) return `${baseURI}-${key}`;
return key;
}