diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/comments/AddComment.tsx | 10 | ||||
-rw-r--r-- | src/components/moments/MomentPostContent.tsx | 16 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx index 24ff830a..12fd7e4d 100644 --- a/src/components/comments/AddComment.tsx +++ b/src/components/comments/AddComment.tsx @@ -133,7 +133,12 @@ const AddComment: React.FC<AddCommentProps> = ({ {(theme === 'white' || (theme === 'dark' && keyboardVisible)) && ( <View style={styles.submitButton}> <TouchableOpacity - style={styles.submitButton} + style={ + comment === '' + ? [styles.submitButton, styles.greyButton] + : styles.submitButton + } + disabled={comment === ''} onPress={addComment}> <UpArrowIcon width={35} height={35} color={'white'} /> </TouchableOpacity> @@ -190,6 +195,9 @@ const styles = StyleSheet.create({ marginVertical: '2%', alignSelf: 'flex-end', }, + greyButton: { + backgroundColor: 'grey', + }, whiteBackround: { backgroundColor: '#fff', }, diff --git a/src/components/moments/MomentPostContent.tsx b/src/components/moments/MomentPostContent.tsx index e76a8ceb..582cba25 100644 --- a/src/components/moments/MomentPostContent.tsx +++ b/src/components/moments/MomentPostContent.tsx @@ -88,14 +88,6 @@ const MomentPostContent: React.FC<MomentPostContentProps> = ({ /> </Animated.View> )} - <View style={styles.footerContainer}> - <CommentsCount - commentsCount={moment.comments_count.toString()} - momentId={moment.moment_id} - screenType={screenType} - /> - <Text style={styles.text}>{elapsedTime}</Text> - </View> {moment.caption !== '' && renderTextWithMentions({ value: moment.caption, @@ -104,6 +96,14 @@ const MomentPostContent: React.FC<MomentPostContentProps> = ({ onPress: (user: UserType) => navigateToProfile(state, dispatch, navigation, screenType, user), })} + <View style={styles.footerContainer}> + <CommentsCount + commentsCount={moment.comments_count.toString()} + momentId={moment.moment_id} + screenType={screenType} + /> + <Text style={styles.text}>{elapsedTime}</Text> + </View> <AddComment placeholderText={'Add a comment here!'} momentId={moment.moment_id} |