mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-20 02:08:33 -05:00
Dragging the enemy SubDef / RES sliders on the comp-analyzer page
fired `useSearchParamState`'s setter on every intermediate value,
which calls `window.history.replaceState`. Browsers cap that at
100 calls per 10 seconds, so any sustained drag tripped:
SecurityError: Attempt to use history.replaceState()
more than 100 times per 10 seconds
Split the slider state into two cells: a local `useState` that drives
the slider thumb, label, and damage calculations on every change, and
the URL-backed hook value, which is only written on drag-end events
(`onPointerUp`, `onKeyUp`, `onBlur`). The URL now updates once per
interaction instead of once per pixel.
|
||
|---|---|---|
| .. | ||
| components | ||
| db | ||
| features | ||
| form | ||
| hooks | ||
| modules | ||
| routines | ||
| styles | ||
| utils | ||
| browser-test-setup.ts | ||
| entry.client.tsx | ||
| entry.server.tsx | ||
| root.tsx | ||
| routes.ts | ||
| test-setup.ts | ||