File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { toastr } from 'react-redux-toastr';
44import axios from 'utils/axios' ;
55import { firebaseError } from 'utils' ;
66import firebase from 'firebase.js' ;
7- import { checkUserData } from './auth' ;
7+ import { checkUserData , AUTH_UPDATE_USER_DATA } from './auth' ;
88
99export const USERS_FETCH_DATA_INIT = createAction ( 'USERS_FETCH_DATA_INIT' ) ;
1010export const USERS_FETCH_DATA_SUCCESS = createAction (
@@ -264,6 +264,12 @@ export const modifyUser = ({
264264 . ref ( `users/${ id } ` )
265265 . update ( userData ) ;
266266
267+ const { uid } = firebase . auth ( ) . currentUser ;
268+
269+ if ( id === uid ) {
270+ dispatch ( AUTH_UPDATE_USER_DATA ( { ...userData , id } ) ) ;
271+ }
272+
267273 try {
268274 await Promise . all ( [ deleteLogoTask , uploadLogoTask , updateUserDbTask ] ) ;
269275 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments