aboutsummaryrefslogtreecommitdiff
path: root/src/components/messages/ChatInput.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-20 18:01:40 -0400
committerIvan Chen <ivan@tagg.id>2021-04-20 18:01:40 -0400
commitbb1479dfcd8daad8ef2593d4ac65a0b1239a6139 (patch)
treeca3d73f914ccacb232f54011b7d6299984e17140 /src/components/messages/ChatInput.tsx
parentc4e76811cae6cf14d5cc8daed9317f808087ed77 (diff)
linted
Diffstat (limited to 'src/components/messages/ChatInput.tsx')
-rw-r--r--src/components/messages/ChatInput.tsx59
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,
},
});