diff --git a/products/ASC.People/Client/src/components/pages/Profile/index.js b/products/ASC.People/Client/src/components/pages/Profile/index.js index 2df1052036..2903ea2af2 100644 --- a/products/ASC.People/Client/src/components/pages/Profile/index.js +++ b/products/ASC.People/Client/src/components/pages/Profile/index.js @@ -5,7 +5,7 @@ import { Loader, toastr } from "asc-web-components"; import { PageLayout, utils } from "asc-web-common"; import { ArticleHeaderContent, ArticleMainButtonContent, ArticleBodyContent } from '../../Article'; import { SectionHeaderContent, SectionBodyContent } from './Section'; -import { fetchProfile } from '../../../store/profile/actions'; +import { fetchProfile, resetProfile } from '../../../store/profile/actions'; import i18n from "./i18n"; import { I18nextProvider, withTranslation } from "react-i18next"; const { changeLanguage } = utils; @@ -44,6 +44,10 @@ class PureProfile extends React.Component { } } + componentWillUnmount(){ + this.props.resetProfile(); + } + render() { //console.log("Profile render") @@ -91,5 +95,5 @@ function mapStateToProps(state) { } export default connect(mapStateToProps, { - fetchProfile + fetchProfile, resetProfile })(Profile); \ No newline at end of file