From e539e05c6ebe470a19bb7e7672e08ae8bc9808ab Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Tue, 8 Aug 2023 22:28:07 -0400 Subject: [PATCH] Improve UI --- components/Media.js | 1 + components/Post.js | 31 ++++++++++++++----------------- components/ProfilePhotoCircle.js | 3 +-- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/components/Media.js b/components/Media.js index 927fbc1..017a04b 100644 --- a/components/Media.js +++ b/components/Media.js @@ -168,6 +168,7 @@ let Media = (props) => { scale: 1.1 }], paddingTop: 5, + paddingBottom: 10, }} showsHorizontalScrollIndicator={false} /> : diff --git a/components/Post.js b/components/Post.js index 561d4ee..d093e8c 100644 --- a/components/Post.js +++ b/components/Post.js @@ -23,7 +23,7 @@ let Post = (props) => { let [bookmarked, changeBookmarked] = useState(post.bookmarks && post.bookmarks.includes(viewer._id)); let toProfileText = post.toProfile && post.toProfile !== post.profileid ? : undefined; - let cleanContent = post.content.replace(/@[A-z]+:.+\w/g, ''); + let cleanContent = post.content.replace(/@[A-z]+:.+\w/g, '').trim(); //cleanContent = convertLinks(cleanContent); const newComentAdded = (commentData) => { let newPostObj = { ...post }; @@ -69,21 +69,15 @@ let Post = (props) => { {!post.nonOrganicType ? - + {toProfileText} - - {" " + Moment(post.createdAt).fromNow()} - + - {cleanContent.length ? - { + + { cleanContent } - : <> - } - - - + : {i18n.t("message.news")} @@ -93,23 +87,23 @@ let Post = (props) => { } - + - - + + {" " + Moment(post.createdAt).fromNow()} + {showCommentsB && } { diff --git a/components/ProfilePhotoCircle.js b/components/ProfilePhotoCircle.js index a768ac1..f2a7434 100644 --- a/components/ProfilePhotoCircle.js +++ b/components/ProfilePhotoCircle.js @@ -29,7 +29,7 @@ const ProfileHeader = ({ profileid, withName = false, small = false }) => { return ( - + {fullName} @@ -42,7 +42,6 @@ const ProfileHeader = ({ profileid, withName = false, small = false }) => { const styles = StyleSheet.create({ container: { flexDirection: 'row', - alignItems: 'center', }, avatarContainer: { marginRight: 5,