Client: Profile: fix re-render

This commit is contained in:
Viktor Fomin 2022-09-02 01:32:57 +03:00
parent e2d1881a3b
commit 0cdaf9c0f5
2 changed files with 8 additions and 10 deletions

View File

@ -67,12 +67,7 @@ const SectionBodyContent = (props) => {
return (
<Wrapper>
<MainProfile
t={t}
profile={profile}
culture={culture}
updateProfile={updateProfile}
/>
<MainProfile t={t} profile={profile} updateProfile={updateProfile} />
{tfa && tfa !== "none" && (
<LoginSettings
t={t}
@ -95,8 +90,7 @@ const SectionBodyContent = (props) => {
export default withRouter(
inject(({ auth, peopleStore }) => {
const { settingsStore, tfaStore } = auth;
const { culture } = settingsStore;
const { tfaStore } = auth;
const { targetUserStore } = peopleStore;
const {
@ -117,7 +111,6 @@ export default withRouter(
return {
profile,
culture,
getBackupCodes,
getNewBackupCodes,
resetTfaApp,

View File

@ -60,13 +60,18 @@ const LanguagesCombo = (props) => {
);
};
export default inject(({ peopleStore }) => {
export default inject(({ auth, peopleStore }) => {
const { loadingStore, targetUserStore } = peopleStore;
const { settingsStore } = auth;
const { setIsLoading } = loadingStore;
const { updateProfileCulture } = targetUserStore;
const { culture } = settingsStore;
return {
setIsLoading,
updateProfileCulture,
culture,
};
})(observer(LanguagesCombo));