mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-16 07:56:22 -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.
|
||
|---|---|---|
| .. | ||
| DamageComboBar.module.css | ||
| DamageComboBar.tsx | ||
| RangeVisualization.module.css | ||
| RangeVisualization.tsx | ||
| SelectedWeapons.browser.test.tsx | ||
| SelectedWeapons.module.css | ||
| SelectedWeapons.tsx | ||
| WeaponCategories.module.css | ||
| WeaponCategories.tsx | ||
| WeaponGrid.browser.test.tsx | ||
| WeaponGrid.module.css | ||
| WeaponGrid.tsx | ||