mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-22 16:38:21 +00:00
Fix page not switching in public apps.
This commit is contained in:
parent
f5f7c0249e
commit
22f6ff0332
1 changed files with 2 additions and 3 deletions
|
|
@ -32,6 +32,8 @@ export const AppsRoute = ({ children, componentType }) => {
|
|||
onValidSession();
|
||||
}
|
||||
|
||||
// handle back and forward navigation
|
||||
window.addEventListener('popstate', handleBrowserNavigation);
|
||||
return () => window.removeEventListener('popstate', handleBrowserNavigation);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isValidSession]);
|
||||
|
|
@ -71,9 +73,6 @@ export const AppsRoute = ({ children, componentType }) => {
|
|||
setExtraProps(restDetails);
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
// handle back and forward navigation
|
||||
window.addEventListener('popstate', handleBrowserNavigation);
|
||||
};
|
||||
|
||||
const handleBrowserNavigation = (e) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue