From fee9b12f1bfb753da65d4df9ab8342e513350960 Mon Sep 17 00:00:00 2001 From: viown <48097677+viown@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:36:26 +0300 Subject: [PATCH] Add libraryMenu as a dependency --- src/apps/dashboard/routes/users/profile.tsx | 2 +- src/apps/stable/routes/user/userprofile.tsx | 2 +- src/components/dashboard/users/UserPasswordForm.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/dashboard/routes/users/profile.tsx b/src/apps/dashboard/routes/users/profile.tsx index 35ec1831e..427ce829e 100644 --- a/src/apps/dashboard/routes/users/profile.tsx +++ b/src/apps/dashboard/routes/users/profile.tsx @@ -198,7 +198,7 @@ const UserEdit = () => { (page.querySelector('#txtMaxActiveSessions') as HTMLInputElement).value = String(user.Policy?.MaxActiveSessions) || '0'; (page.querySelector('#selectSyncPlayAccess') as HTMLSelectElement).value = String(user.Policy?.SyncPlayAccess); loading.hide(); - }, [ userDto, loadAuthProviders, loadPasswordResetProviders, loadDeleteFolders ]); + }, [ libraryMenu ]); const loadData = useCallback(() => { if (!userDto) { diff --git a/src/apps/stable/routes/user/userprofile.tsx b/src/apps/stable/routes/user/userprofile.tsx index ad584270d..36a01fcba 100644 --- a/src/apps/stable/routes/user/userprofile.tsx +++ b/src/apps/stable/routes/user/userprofile.tsx @@ -97,7 +97,7 @@ const UserProfile: FunctionComponent = () => { }).catch(err => { console.error('[userprofile] failed to get current user', err); }); - }, [user]); + }, [user, libraryMenu]); useEffect(() => { const page = element.current; diff --git a/src/components/dashboard/users/UserPasswordForm.tsx b/src/components/dashboard/users/UserPasswordForm.tsx index b3a063412..fbe668ac9 100644 --- a/src/components/dashboard/users/UserPasswordForm.tsx +++ b/src/components/dashboard/users/UserPasswordForm.tsx @@ -54,7 +54,7 @@ const UserPasswordForm: FunctionComponent = ({ user }: IProps) => { (page.querySelector('#txtCurrentPassword') as HTMLInputElement).value = ''; (page.querySelector('#txtNewPassword') as HTMLInputElement).value = ''; (page.querySelector('#txtNewPasswordConfirm') as HTMLInputElement).value = ''; - }, [user]); + }, [user, libraryMenu]); useEffect(() => { const page = element.current;