Skip to content
Snippets Groups Projects
Commit ec1a440b authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

fixed modal not closing on success

parent fe313084
3 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system
...@@ -89,7 +89,7 @@ export default function ComponentAlterarAvatar (props) { ...@@ -89,7 +89,7 @@ export default function ComponentAlterarAvatar (props) {
function handleSuccess(data) { function handleSuccess(data) {
const target = state.currentUser const target = state.currentUser
const source = {userAvatar : data.avatar} const source = {avatar : data.avatar}
dispatch({ dispatch({
type : 'USER_CHANGED_COVER', type : 'USER_CHANGED_COVER',
currUser : Object.assign(target, source) currUser : Object.assign(target, source)
......
...@@ -39,11 +39,12 @@ export default function ComponentAlterarCover (props) { ...@@ -39,11 +39,12 @@ export default function ComponentAlterarCover (props) {
function handleSuccess (data) { function handleSuccess (data) {
const target = state.currentUser const target = state.currentUser
const source = {userCover : data.cover} const source = {cover : data.cover}
dispatch({ dispatch({
type : 'USER_CHANGED_COVER', type : 'USER_CHANGED_COVER',
currUser : Object.assign(target, source) currUser : Object.assign(target, source)
}) })
props.handleClose()
} }
const completeSelection = () => { const completeSelection = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment