useEffect keyed on currentSiteId resets sortBy to 'distance' whenever the site selection changes, overcoming useState's one-time initialisation which didn't fire on soft navigations (state preserved across router.push). Verified with Playwright: no-site→price, select-site→distance auto, manual price switch works, switch-site→distance resets. |
||
|---|---|---|
| .. | ||
| pelagia-portal | ||