mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
Change comments from current user fetches since profileImage wasn't added to attributes
This commit is contained in:
parent
96b1ddaaec
commit
9a8642b752
3 changed files with 2 additions and 6 deletions
|
|
@ -12,8 +12,6 @@ const Avatar = props => {
|
|||
const avatarUser = ensureUser(user);
|
||||
const { displayName, abbreviatedName } = avatarUser.attributes.profile;
|
||||
|
||||
// TODO this is a temporary avatar fix for currentUser's profile data.
|
||||
// Avatar images should be included to all user's attributes in the future.
|
||||
if (avatarUser.profileImage && avatarUser.profileImage.id) {
|
||||
return (
|
||||
<div className={classes} title={displayName}>
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ export const updateProfile = actionPayload => {
|
|||
.then(response => {
|
||||
dispatch(updateProfileSuccess(response));
|
||||
|
||||
// Temporary denormalization for profileImage
|
||||
// Profile image will be included to users
|
||||
// Include profile image to denormalized user entity
|
||||
const currentUserId = response.data.data.id;
|
||||
const entities = updatedEntities({}, response.data);
|
||||
const denormalised = denormalisedEntities(entities, 'current-user', [currentUserId]);
|
||||
|
|
|
|||
|
|
@ -321,8 +321,7 @@ export const fetchCurrentUser = () =>
|
|||
return sdk.currentUser
|
||||
.show({ include: ['profileImage'] })
|
||||
.then(response => {
|
||||
// Temporary denormalization for profileImage
|
||||
// Profile image will be included to users
|
||||
// Include profile image to denormalized user entity
|
||||
const currentUserId = response.data.data.id;
|
||||
const entities = updatedEntities({}, response.data);
|
||||
const denormalised = denormalisedEntities(entities, 'current-user', [currentUserId]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue