feat(FN-3344): preserve history state in deep-link close
Fixes deep-link close to preserve browser history state and adds comprehensive integration tests for the navigation history feature, covering App component and useDeepLink hook behavior. Fusion-Task-Id: FN-3344
This commit is contained in:
@@ -91,8 +91,9 @@ export function useDeepLink(options: UseDeepLinkOptions): UseDeepLinkResult {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
params.delete("task");
|
||||
const query = params.toString();
|
||||
const existingState = window.history.state ?? {};
|
||||
window.history.replaceState(
|
||||
null,
|
||||
existingState,
|
||||
"",
|
||||
query ? `${window.location.pathname}?${query}` : window.location.pathname,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user