AOSSIE-Org / AOSSIE-Org/OrgExplorer

Refactor: Centralize localStorage Operations in a Storage Utility

Offen
#194 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
JavaScript
Sterne
34
Forks
92
Ø Merge
8 T. 7 Std.
Gemergte PRs (30 T.)
12

Beschreibung

## Problem

`AppContext.jsx` currently contains direct `localStorage` operations for:

* PAT (`oe_pat`)
* Rate limit (`oe_rate_limit`)
* Recent searches (`oe_recent`)

This couples storage logic with application state and makes it harder to maintain.

## Proposed Solution

Create a reusable storage utility at:

`src/utils/storage.js`

The utility should:

* Centralize `localStorage` access
* Define storage keys using `STORAGE_KEYS`
* Provide `get`, `set`, and `remove` methods

Then update `src/context/AppContext.jsx` to use the storage utility instead of accessing `localStorage` directly.

## Expected Result

* No direct `localStorage` calls in `AppContext.jsx`
* Storage keys have a single source of truth
* Existing PAT, rate-limit, and recent-search behaviour remains unchanged

**Type:** Code Quality Improvement

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reading src/context/AppContext.jsx to locate the PAT, rate-limit, and recent-search localStorage operations, then inspect the surrounding src/utils structure. Use the issue's expected results as the checklist: storage access and keys are centralized in src/utils/storage.js, AppContext.jsx has no direct localStorage calls, and existing behavior remains unchanged.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
frontend
Issue-Typ
Refactoring
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
76/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.