mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
regressing rn
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// Settings Provider
|
||||
// Purpose: Supplies app-wide settings state and namespace-scoped update APIs. Scope: Bridges persistence helpers with React context for consistent settings access.
|
||||
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { loadSettings, saveSettings } from './persistence.js';
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
// Settings Constants
|
||||
// Purpose: Defines keys/defaults used by the persisted settings subsystem. Scope: Centralizes stable identifiers and fallback values for settings storage.
|
||||
export const SETTINGS_COOKIE = 'roverSettings';
|
||||
export const SETTINGS_MAX_AGE = 60 * 60 * 24 * 365; // 1 year
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
// Settings Module Exports
|
||||
// Purpose: Re-exports settings provider and hooks from a single import path. Scope: Keeps settings consumers decoupled from internal file layout.
|
||||
export { SettingsProvider, useSettings, useSettingsNamespace } from './SettingsProvider.jsx';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Settings Namespaces
|
||||
// Purpose: Defines namespace identifiers used to segment persisted settings data. Scope: Prevents key collisions and standardizes settings lookup domains.
|
||||
export const INPUT_SETTINGS_DEFAULTS = {
|
||||
keyboard: {
|
||||
baseSpeed: 250,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Settings Persistence
|
||||
// Purpose: Implements local persistence read/write behavior for settings namespaces. Scope: Encapsulates storage IO, parsing guards, and migration-safe defaults.
|
||||
import { SETTINGS_COOKIE, SETTINGS_MAX_AGE } from './constants.js';
|
||||
|
||||
function parseCookieValue(raw) {
|
||||
|
||||
Reference in New Issue
Block a user