Fix discover state not preserved on browser back

This commit is contained in:
Jared Schoeny
2026-07-07 14:05:23 -06:00
parent d9986e6af8
commit 17a58d18fc

View File

@@ -95,6 +95,7 @@ export function useDiscoverUrlState({ currentState, onUrlStateChange }: UseDisco
onUrlStateChangeRef.current(nextState);
};
applyUrlState();
window.addEventListener("popstate", applyUrlState);
return () => window.removeEventListener("popstate", applyUrlState);
}, [clearSearchUrlTimeout]);