mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-08-22 00:24:34 -05:00
Fix discover state not preserved on browser back
This commit is contained in:
@@ -95,6 +95,7 @@ export function useDiscoverUrlState({ currentState, onUrlStateChange }: UseDisco
|
||||
onUrlStateChangeRef.current(nextState);
|
||||
};
|
||||
|
||||
applyUrlState();
|
||||
window.addEventListener("popstate", applyUrlState);
|
||||
return () => window.removeEventListener("popstate", applyUrlState);
|
||||
}, [clearSearchUrlTimeout]);
|
||||
|
||||
Reference in New Issue
Block a user