feat: persist exploration zone selection in sessionStorage
CI / Lint, Build & Test (pull_request) Successful in 1m16s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m17s

Applies the same sticky-zone pattern as the boss and quest panels.
The handleZoneSelect wrapper already existed — it just needed to write
to sessionStorage alongside updating state, and the useState initialiser
needed to read from sessionStorage on mount.
This commit is contained in:
2026-03-09 22:15:38 -07:00
committed by Naomi Carrigan
parent 2c16736bdf
commit c3e85c3768
@@ -67,7 +67,9 @@ interface CollectResult {
const ExplorationPanel = (): JSX.Element => {
const { state, startExploration, collectExploration, formatNumber }
= useGame();
const [ activeZoneId, setActiveZoneId ] = useState("verdant_vale");
const [ activeZoneId, setActiveZoneId ] = useState(() => {
return sessionStorage.getItem("elysium_explore_zone") ?? "verdant_vale";
});
const [ pendingAreaId, setPendingAreaId ] = useState<string | null>(null);
const [ lastResult, setLastResult ] = useState<CollectResult | null>(null);
@@ -116,6 +118,7 @@ const ExplorationPanel = (): JSX.Element => {
function handleZoneSelect(id: string): void {
setActiveZoneId(id);
setLastResult(null);
sessionStorage.setItem("elysium_explore_zone", id);
}
const goldChange = lastResult?.response.event?.goldChange ?? 0;