From bb1479dfcd8daad8ef2593d4ac65a0b1239a6139 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Tue, 20 Apr 2021 18:01:40 -0400
Subject: linted

---
 src/components/messages/ChatInput.tsx | 59 +++++++++++++++++------------------
 1 file changed, 28 insertions(+), 31 deletions(-)

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

diff --git a/src/components/messages/ChatInput.tsx b/src/components/messages/ChatInput.tsx
index 005d4401..bde5fc12 100644
--- a/src/components/messages/ChatInput.tsx
+++ b/src/components/messages/ChatInput.tsx
@@ -1,12 +1,10 @@
 import React from 'react';
 import {Image, StyleSheet, View} from 'react-native';
 import {TouchableOpacity} from 'react-native-gesture-handler';
-import ImagePicker from 'react-native-image-crop-picker';
 import {useStore} from 'react-redux';
 import {
   AutoCompleteInput,
   MessageInputProps,
-  useAttachmentPickerContext,
   useMessageInputContext,
 } from 'stream-chat-react-native';
 import {RootState} from '../../store/rootReducer';
@@ -35,35 +33,35 @@ const ChatInput: React.FC<
 > = () => {
   const state: RootState = useStore().getState();
   const avatar = state.user.avatar;
-  const {sendMessage, text, setText, uploadNewImage} = useMessageInputContext();
-  const {
-    setSelectedImages,
-    selectedImages,
-    openPicker,
-  } = useAttachmentPickerContext();
+  const {sendMessage, text, setText} = useMessageInputContext();
+  // const {
+  //   setSelectedImages,
+  //   selectedImages,
+  //   openPicker,
+  // } = useAttachmentPickerContext();
 
-  const selectImage = () => {
-    ImagePicker.openPicker({
-      cropping: true,
-      freeStyleCropEnabled: true,
-      mediaType: 'photo',
-      multiple: true,
-      // includeBase64: true,
-    })
-      .then((pictures) => {
-        pictures.map((pic) =>
-          uploadNewImage({
-            width: pic.width,
-            height: pic.height,
-            source: 'picker',
-            uri: 'ph://' + pic.localIdentifier,
-          }),
-        );
-      })
-      .catch((error) => {
-        console.log(error);
-      });
-  };
+  // const selectImage = () => {
+  //   ImagePicker.openPicker({
+  //     cropping: true,
+  //     freeStyleCropEnabled: true,
+  //     mediaType: 'photo',
+  //     multiple: true,
+  //     // includeBase64: true,
+  //   })
+  //     .then((pictures) => {
+  //       pictures.map((pic) =>
+  //         uploadNewImage({
+  //           width: pic.width,
+  //           height: pic.height,
+  //           source: 'picker',
+  //           uri: 'ph://' + pic.localIdentifier,
+  //         }),
+  //       );
+  //     })
+  //     .catch((error) => {
+  //       console.log(error);
+  //     });
+  // };
 
   return (
     <View style={styles.container}>
@@ -139,7 +137,6 @@ const styles = StyleSheet.create({
     marginRight: 10,
     width: 100,
     alignSelf: 'flex-end',
-    // borderWidth: 1,
   },
 });
 
-- 
cgit v1.2.3-70-g09d2

