diff options
-rw-r--r-- | src/components/comments/AddComment.tsx | 6 | ||||
-rw-r--r-- | src/components/comments/CommentTextField.tsx | 21 | ||||
-rw-r--r-- | src/components/comments/MentionInputControlled.tsx | 10 |
3 files changed, 4 insertions, 33 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx index 3c0e9a0a..01325475 100644 --- a/src/components/comments/AddComment.tsx +++ b/src/components/comments/AddComment.tsx @@ -7,14 +7,11 @@ import { TextInput, View, } from 'react-native'; -import {TouchableOpacity} from 'react-native-gesture-handler'; -import {useDispatch, useSelector} from 'react-redux'; -import UpArrowIcon from '../../assets/icons/up_arrow.svg'; +import {useDispatch} from 'react-redux'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {CommentContext} from '../../screens/profile/MomentCommentsScreen'; import {postComment} from '../../services'; import {updateReplyPosted} from '../../store/actions'; -import {RootState} from '../../store/rootreducer'; import {CommentThreadType, CommentType} from '../../types'; import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import {mentionPartTypes} from '../../utils/comments'; @@ -33,7 +30,6 @@ const AddComment: React.FC<AddCommentProps> = ({momentId, placeholderText}) => { const [inReplyToMention, setInReplyToMention] = useState(''); const [comment, setComment] = useState(''); const [keyboardVisible, setKeyboardVisible] = useState(false); - const {avatar} = useSelector((state: RootState) => state.user); const dispatch = useDispatch(); const ref = useRef<TextInput>(null); const isReplyingToComment = diff --git a/src/components/comments/CommentTextField.tsx b/src/components/comments/CommentTextField.tsx index 61b489bb..3e97449c 100644 --- a/src/components/comments/CommentTextField.tsx +++ b/src/components/comments/CommentTextField.tsx @@ -1,46 +1,31 @@ -import React, { - FC, - MutableRefObject, - Ref, - useMemo, - useRef, - useState, - ReactFragment, -} from 'react'; +import React, {FC, ReactFragment} from 'react'; import { NativeSyntheticEvent, StyleSheet, StyleProp, Text, TextInput, - TextInputProps, TextInputSelectionChangeEventData, TouchableOpacity, View, ViewStyle, } from 'react-native'; -import {useDispatch, useSelector} from 'react-redux'; +import {useSelector} from 'react-redux'; import {TAGG_LIGHT_BLUE} from '../../constants'; +import {RootState} from '../../store/rootReducer'; import { Part, PartType, - PatternPartType, MentionPartType, - Suggestion, } from 'react-native-controlled-mentions/dist/types'; import { defaultMentionTextStyle, - generateValueFromPartsAndChangedText, - generateValueWithAddedSuggestion, - getMentionPartSuggestionKeywords, isMentionPartType, - parseValue, } from 'react-native-controlled-mentions/dist/utils'; import {Avatar} from '../common'; import {normalize} from 'react-native-elements'; import UpArrowIcon from '../../assets/icons/up_arrow.svg'; -import {SCREEN_WIDTH, SCREEN_HEIGHT} from '../../utils'; type CommentTextFieldProps = { containerStyle: StyleProp<ViewStyle>; diff --git a/src/components/comments/MentionInputControlled.tsx b/src/components/comments/MentionInputControlled.tsx index 50762ac0..de52d1c1 100644 --- a/src/components/comments/MentionInputControlled.tsx +++ b/src/components/comments/MentionInputControlled.tsx @@ -5,22 +5,17 @@ import React, { useMemo, useRef, useState, - ReactFragment, } from 'react'; import { NativeSyntheticEvent, - StyleSheet, StyleProp, Text, TextInput, TextInputProps, TextInputSelectionChangeEventData, - TouchableOpacity, View, ViewStyle, } from 'react-native'; -import {useDispatch, useSelector} from 'react-redux'; -import {TAGG_LIGHT_BLUE} from '../../constants'; import { PatternPartType, MentionPartType, @@ -34,11 +29,6 @@ import { isMentionPartType, parseValue, } from 'react-native-controlled-mentions/dist/utils'; -import {Avatar} from '../common'; -import {normalize} from 'react-native-elements'; - -import UpArrowIcon from '../../assets/icons/up_arrow.svg'; -import {SCREEN_WIDTH, SCREEN_HEIGHT} from '../../utils'; type PartType = MentionPartType | PatternPartType; |