fix(app): avoid shadowing layout options

This commit is contained in:
Ivan Malison
2026-10-14 19:52:10 -07:00
parent f6b33151d1
commit 44c3e264df
@@ -997,14 +997,14 @@ interface WorkspaceLayoutStoreOptions {
scheduler?: PersistenceScheduler;
}
export function createWorkspaceLayoutStore(options: WorkspaceLayoutStoreOptions = {}) {
const ids = options.ids ?? defaultWorkspaceLayoutIds;
export function createWorkspaceLayoutStore(storeOptions: WorkspaceLayoutStoreOptions = {}) {
const ids = storeOptions.ids ?? defaultWorkspaceLayoutIds;
const persistStorage = createThrottledPersistStorage(
createValidatedPersistStorage(
options.storage ?? AsyncStorage,
storeOptions.storage ?? AsyncStorage,
WorkspaceLayoutPersistedStateSchema,
),
{ intervalMs: WORKSPACE_LAYOUT_PERSIST_INTERVAL_MS, scheduler: options.scheduler },
{ intervalMs: WORKSPACE_LAYOUT_PERSIST_INTERVAL_MS, scheduler: storeOptions.scheduler },
);
const store = create<WorkspaceLayoutStore>()(
persist(