Maintain existing overlay state when setting hash

This commit is contained in:
Nicolas Mowen 2024-03-16 07:40:26 -06:00
parent 89bd3867a9
commit 57a8d16d2e

View File

@ -76,7 +76,7 @@ export function useHashState<S extends string>(): [
if (!value) {
navigate(location.pathname);
} else {
navigate(`${location.pathname}#${value}`);
navigate(`${location.pathname}#${value}`, { state: location.state });
}
},
// we know that these deps are correct