@@ -12,7 +12,9 @@ import { NOTIFICATION_TYPE } from '../../../../src/common/notification/constants
1212import client from '../../../../src/common/api/client' ;
1313import injectT from '../../../i18n/injectT' ;
1414
15- function UserEmailFormModal ( { userId, show, t } ) {
15+ function UserEmailFormModal ( {
16+ fetchUser, userId, show, t,
17+ } ) {
1618 const [ open , setOpen ] = useState ( false ) ;
1719 const [ error , setError ] = useState ( false ) ;
1820 const [ emailMismatch , setEmailMismatch ] = useState ( false ) ;
@@ -35,6 +37,7 @@ function UserEmailFormModal({ userId, show, t }) {
3537 . then ( ( ) => {
3638 createNotification ( NOTIFICATION_TYPE . SUCCESS , t ( 'UserEmailForm.emailSet' ) ) ;
3739 setOpen ( false ) ;
40+ fetchUser ( userId ) ;
3841 } )
3942 . catch ( ( e ) => {
4043 setError ( true ) ;
@@ -129,6 +132,7 @@ function UserEmailFormModal({ userId, show, t }) {
129132}
130133
131134UserEmailFormModal . propTypes = {
135+ fetchUser : PropTypes . func . isRequired ,
132136 userId : PropTypes . string . isRequired ,
133137 show : PropTypes . bool . isRequired ,
134138 t : PropTypes . func . isRequired ,
0 commit comments