aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-27 10:46:17 -0400
committerIvan Chen <ivan@tagg.id>2021-04-27 10:46:17 -0400
commita13dcb5110245bb554d79e779c4942e6f5aaf18a (patch)
treebb8e5bebe2cf5677d0ffc9b72819a56c9d309cbf /src/components/comments
parentcaac607ed90c35ad8d4b2787b170e1fd1f165333 (diff)
refactored avatar
Diffstat (limited to 'src/components/comments')
-rw-r--r--src/components/comments/AddComment.tsx11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx
index 3b195a2b..2a8c773e 100644
--- a/src/components/comments/AddComment.tsx
+++ b/src/components/comments/AddComment.tsx
@@ -1,6 +1,5 @@
import React, {useEffect, useRef} from 'react';
import {
- Image,
Keyboard,
KeyboardAvoidingView,
Platform,
@@ -15,6 +14,7 @@ import {postComment} from '../../services';
import {updateReplyPosted} from '../../store/actions';
import {RootState} from '../../store/rootreducer';
import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
+import {Avatar} from '../common';
/**
* This file provides the add comment view for a user.
@@ -101,14 +101,7 @@ const AddComment: React.FC<AddCommentProps> = ({
keyboardVisible ? styles.whiteBackround : {},
]}>
<View style={styles.textContainer}>
- <Image
- style={styles.avatar}
- source={
- avatar
- ? {uri: avatar}
- : require('../../assets/images/avatar-placeholder.png')
- }
- />
+ <Avatar style={styles.avatar} uri={avatar} />
<TextInput
style={styles.text}
placeholder={placeholderText}