From efce351342d4d65676fff4def0c35faac5d9d4cd Mon Sep 17 00:00:00 2001 From: Margarita Date: Fri, 7 Jul 2023 15:41:58 +0300 Subject: [PATCH] feat(in-710): personal info language fixes --- .../UserAccount/components/PagePersonalInfo/hooks/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/features/UserAccount/components/PagePersonalInfo/hooks/index.tsx b/src/features/UserAccount/components/PagePersonalInfo/hooks/index.tsx index b2cb69e7..d381f516 100644 --- a/src/features/UserAccount/components/PagePersonalInfo/hooks/index.tsx +++ b/src/features/UserAccount/components/PagePersonalInfo/hooks/index.tsx @@ -78,13 +78,15 @@ export const useUserInfo = () => { setLoader(true) saveUserInfo(data).then(() => { fetchUserInfo() - + }).finally(() => { const lang_iso = find(languageList, (language) => language.id === data.language_id)?.iso_639_1 if (lang_iso) { changeLang(lang_iso) } - }).finally(() => setLoader(false)) + + setLoader(false) + }) // eslint-disable-next-line react-hooks/exhaustive-deps }, [fetchUserInfo])