fix(webui): preserve project when creating a topic from its menu
This commit is contained in:
1 parent
1469d4811c
commit
fea28b1a00
2 files changed
+49
-2
No files matched your search
+10
-2
@@ -316,7 +316,11 @@ function writeShellRoute(route: ShellRoute, replace = false): void {
|
||||
);
|
||||
return;
|
||||
}
|
||||
window.location.hash = nextHash;
|
||||
window.history.pushState(
|
||||
null,
|
||||
"",
|
||||
`${window.location.pathname}${window.location.search}${nextHash}`,
|
||||
);
|
||||
}
|
||||
|
||||
function bootstrapTokenExpiresAt(expiresInSeconds: number): number {
|
||||
@@ -1135,7 +1139,11 @@ function Shell({
|
||||
}
|
||||
};
|
||||
window.addEventListener("hashchange", applyRoute);
|
||||
return () => window.removeEventListener("hashchange", applyRoute);
|
||||
window.addEventListener("popstate", applyRoute);
|
||||
return () => {
|
||||
window.removeEventListener("hashchange", applyRoute);
|
||||
window.removeEventListener("popstate", applyRoute);
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user