diff --git a/src/components/ServerContentPage.tsx b/src/components/ServerContentPage.tsx index e5428269bc..5b86d66072 100644 --- a/src/components/ServerContentPage.tsx +++ b/src/components/ServerContentPage.tsx @@ -47,12 +47,13 @@ const ServerContentPage: FunctionComponent = ({ view }) }; loadPage(); - }, [ + }, + // location.state is NOT included as a dependency here since dialogs will update state while the current view stays the same + // eslint-disable-next-line react-hooks/exhaustive-deps + [ view, location.pathname, location.search - // location.state is NOT included as a dependency here since dialogs will update state while the current view - // stays the same ]); return <>; diff --git a/src/components/viewManager/ViewManagerPage.tsx b/src/components/viewManager/ViewManagerPage.tsx index 511338d1e2..98cf0dcb01 100644 --- a/src/components/viewManager/ViewManagerPage.tsx +++ b/src/components/viewManager/ViewManagerPage.tsx @@ -64,7 +64,10 @@ const ViewManagerPage: FunctionComponent = ({ }; loadPage(); - }, [ + }, + // location.state is NOT included as a dependency here since dialogs will update state while the current view stays the same + // eslint-disable-next-line react-hooks/exhaustive-deps + [ controller, view, type, @@ -74,8 +77,6 @@ const ViewManagerPage: FunctionComponent = ({ transition, location.pathname, location.search - // location.state is NOT included as a dependency here since dialogs will update state while the current view - // stays the same ]); return <>;