mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
fix: storage key conflict across stages
This commit is contained in:
committed by
Carlos Valente
parent
efceb930e5
commit
617da68ab5
@@ -1,6 +1,8 @@
|
||||
import { ClientList } from 'ontime-types';
|
||||
import { create } from 'zustand';
|
||||
|
||||
import { makeStageKey } from '../utils/localStorage';
|
||||
|
||||
interface ClientStore {
|
||||
name?: string;
|
||||
setName: (newValue: string) => void;
|
||||
@@ -15,7 +17,7 @@ interface ClientStore {
|
||||
setClients: (clients: ClientList) => void;
|
||||
}
|
||||
|
||||
const clientNameKey = 'ontime-client-name';
|
||||
const clientNameKey = makeStageKey('client-name');
|
||||
|
||||
function persistNameInStorage(newValue: string) {
|
||||
localStorage.setItem(clientNameKey, newValue);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { create } from 'zustand';
|
||||
import { booleanFromLocalStorage } from '../utils/localStorage';
|
||||
|
||||
enum LocalEventKeys {
|
||||
Mirror = 'ontime-view-mirror',
|
||||
Mirror = 'view-mirror',
|
||||
}
|
||||
|
||||
type ViewOptionsStore = {
|
||||
|
||||
Reference in New Issue
Block a user