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

fixed avatar display bug

parent 109408ce
No related branches found
No related tags found
6 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa,!31Fix console error,!30Centraliza axios
...@@ -55,7 +55,16 @@ export default function LoginModal (props){ ...@@ -55,7 +55,16 @@ export default function LoginModal (props){
handleSnackbar(false); handleSnackbar(false);
} }
function renameKeys (obj) {
if (obj.avatar_file_name) {
Object.defineProperty(obj, 'avatar',
Object.getOwnPropertyDescriptor(obj, 'avatar_file_name'));
delete obj['avatar_file_name'];
}
}
function handleSuccess (data) { function handleSuccess (data) {
renameKeys(data.data)
dispatch ({ dispatch ({
type: "USER_LOGGED_IN", type: "USER_LOGGED_IN",
userLoggedIn: !state.userIsLoggedIn, userLoggedIn: !state.userIsLoggedIn,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment