Include location search in history stack
This commit is contained in:
@@ -39,10 +39,10 @@ export const useHistory = () => {
|
|||||||
updateHistory([...history.slice(0, -1)]);
|
updateHistory([...history.slice(0, -1)]);
|
||||||
break;
|
break;
|
||||||
case NavigationType.Push:
|
case NavigationType.Push:
|
||||||
updateHistory([...history, location.pathname]);
|
updateHistory([...history, location.pathname + location.search]);
|
||||||
break;
|
break;
|
||||||
case NavigationType.Replace:
|
case NavigationType.Replace:
|
||||||
updateHistory([...history.slice(0, -1), location.pathname]);
|
updateHistory([...history.slice(0, -1), location.pathname + location.search]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unexpected NavigationType "${navigationType}"`);
|
throw new Error(`Unexpected NavigationType "${navigationType}"`);
|
||||||
|
|||||||
Reference in New Issue
Block a user