From bd7454dce7e14530fdde747e5a0b006e03444c5c Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sat, 27 Feb 2021 20:27:56 +0200 Subject: [PATCH] Refactoring --- .../components/PostList/PostListRow/index.jsx | 6 +++--- .../src/components/ProfileImage.jsx | 18 +++++++++--------- .../TopicList/TopicListRow/index.jsx | 6 +++--- .../src/views/Profile/GeneralTab/index.jsx | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/concordia-app/src/components/PostList/PostListRow/index.jsx b/packages/concordia-app/src/components/PostList/PostListRow/index.jsx index e2a86b7..cccc576 100644 --- a/packages/concordia-app/src/components/PostList/PostListRow/index.jsx +++ b/packages/concordia-app/src/components/PostList/PostListRow/index.jsx @@ -108,9 +108,9 @@ const PostListRow = (props) => { diff --git a/packages/concordia-app/src/components/ProfileImage.jsx b/packages/concordia-app/src/components/ProfileImage.jsx index 5c78f66..f7be574 100644 --- a/packages/concordia-app/src/components/ProfileImage.jsx +++ b/packages/concordia-app/src/components/ProfileImage.jsx @@ -6,7 +6,7 @@ import { USER_PROFILE_PICTURE } from '../constants/orbit/UserDatabaseKeys'; const ProfileImage = (props) => { const { - topicAuthorAddress, topicAuthor, topicAuthorMeta, avatarUrl, size, link, + profileAddress, profileUsername, topicAuthorMeta, avatarUrl, size, link, } = props; const stopClickPropagation = (event) => { @@ -20,30 +20,30 @@ const ProfileImage = (props) => { return ( ); - }, [avatarUrl, size, topicAuthor, topicAuthorMeta]); + }, [avatarUrl, size, profileUsername, topicAuthorMeta]); return useMemo(() => { - if (link && topicAuthorAddress) { + if (link && profileAddress) { return ( - + {authorAvatar} ); } return authorAvatar; - }, [authorAvatar, link, topicAuthorAddress]); + }, [authorAvatar, link, profileAddress]); }; ProfileImage.propTypes = { - topicAuthorAddress: PropTypes.string, - topicAuthor: PropTypes.string, - topicAuthorMeta: PropTypes.shape({ id: PropTypes.string, profile_picture: PropTypes.string }), + profileAddress: PropTypes.string, + profileUsername: PropTypes.string, + profileUserMeta: PropTypes.shape({ id: PropTypes.string, profile_picture: PropTypes.string }), avatarUrl: PropTypes.string, size: PropTypes.string, link: PropTypes.bool, diff --git a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx index 16ed29b..5fffc4a 100644 --- a/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx +++ b/packages/concordia-app/src/components/TopicList/TopicListRow/index.jsx @@ -105,9 +105,9 @@ const TopicListRow = (props) => { diff --git a/packages/concordia-app/src/views/Profile/GeneralTab/index.jsx b/packages/concordia-app/src/views/Profile/GeneralTab/index.jsx index c03bf37..0b710fa 100644 --- a/packages/concordia-app/src/views/Profile/GeneralTab/index.jsx +++ b/packages/concordia-app/src/views/Profile/GeneralTab/index.jsx @@ -108,8 +108,8 @@ const GeneralTab = (props) => {