From a13dcb5110245bb554d79e779c4942e6f5aaf18a Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Tue, 27 Apr 2021 10:46:17 -0400
Subject: refactored avatar

---
 src/components/messages/ChatInput.tsx | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

(limited to 'src/components/messages/ChatInput.tsx')

diff --git a/src/components/messages/ChatInput.tsx b/src/components/messages/ChatInput.tsx
index a6e5c458..5585d246 100644
--- a/src/components/messages/ChatInput.tsx
+++ b/src/components/messages/ChatInput.tsx
@@ -1,5 +1,5 @@
 import React from 'react';
-import {Image, StyleSheet, View} from 'react-native';
+import {StyleSheet, View} from 'react-native';
 import {useStore} from 'react-redux';
 import {
   AutoCompleteInput,
@@ -17,6 +17,7 @@ import {
   LocalUserType,
 } from '../../types';
 import {normalize} from '../../utils';
+import {Avatar} from '../common';
 import {ChatInputSubmit} from '../messages';
 
 const ChatInput: React.FC<
@@ -65,14 +66,7 @@ const ChatInput: React.FC<
   return (
     <View style={styles.container}>
       <View style={styles.textContainer}>
-        <Image
-          style={styles.avatar}
-          source={
-            avatar
-              ? {uri: avatar}
-              : require('../../assets/images/avatar-placeholder.png')
-          }
-        />
+        <Avatar style={styles.avatar} uri={avatar} />
         <AutoCompleteInput />
         <View style={styles.actionButtons}>
           {/* TODO: Not working, toggled off for now */}
-- 
cgit v1.2.3-70-g09d2

