diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-22 14:32:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 14:32:15 -0400 |
commit | f0cff95cfa612b295caf68552bc3d29a7fb23a42 (patch) | |
tree | dd3df697478a19048cd4bf6d0b499a91c1a93eb3 /src/components/messages/ChatInput.tsx | |
parent | 4e8e1c0d58424e6b63cfb8470fc0a73c0e6b102b (diff) | |
parent | 33c172cc31957966b14321520c56816ba044db14 (diff) |
Merge pull request #374 from IvanIFChen/hotfix-linting-fixup
[HOTFIX] Linter fixup
Diffstat (limited to 'src/components/messages/ChatInput.tsx')
-rw-r--r-- | src/components/messages/ChatInput.tsx | 59 |
1 files changed, 28 insertions, 31 deletions
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, }, }); |