Web:Common:store:UserStore Fixed mobx warning when changing the theme

This commit is contained in:
Akmal Isomadinov 2023-04-11 13:47:08 +05:00
parent b6ca42a92f
commit e72bb1d9a9

View File

@ -1,6 +1,6 @@
import React from "react";
import { toastr } from "@docspace/components";
import { makeAutoObservable } from "mobx";
import { makeAutoObservable, runInAction } from "mobx";
import { Trans } from "react-i18next";
import api from "../api";
import { EmployeeActivationStatus } from "../constants";
@ -80,7 +80,9 @@ class UserStore {
const { theme } = await api.people.changeTheme(key);
runInAction(() => {
this.user.theme = theme;
})
this.setIsLoading(false);