diff options
Diffstat (limited to 'src/screens/chat/ChatResultsCell.tsx')
-rw-r--r-- | src/screens/chat/ChatResultsCell.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/screens/chat/ChatResultsCell.tsx b/src/screens/chat/ChatResultsCell.tsx index 00f7130d..3678a2d7 100644 --- a/src/screens/chat/ChatResultsCell.tsx +++ b/src/screens/chat/ChatResultsCell.tsx @@ -2,14 +2,12 @@ import {useNavigation} from '@react-navigation/native'; import React, {useContext, useEffect, useState} from 'react'; import {Alert, Image, StyleSheet, Text, View} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; -import {useDispatch, useSelector, useStore} from 'react-redux'; +import {ChatContext} from '../../App'; +import {ERROR_FAILED_TO_CREATE_CHANNEL} from '../../constants/strings'; import {loadImageFromURL} from '../../services'; -import {RootState} from '../../store/rootReducer'; import {ProfilePreviewType, UserType} from '../../types'; import {createChannel, normalize, SCREEN_WIDTH} from '../../utils'; import {defaultUserProfile} from '../../utils/users'; -import {ChatContext} from '../../App'; -import {ERROR_FAILED_TO_CREATE_CHANNEL} from '../../constants/strings'; interface ChatResults { profileData: ProfilePreviewType; @@ -24,7 +22,6 @@ const ChatResultsCell: React.FC<ChatResults> = ({ }) => { const [avatar, setAvatar] = useState<string | undefined>(undefined); const {chatClient, setChannel} = useContext(ChatContext); - const {university} = useSelector((state: RootState) => state.user.profile); useEffect(() => { (async () => { @@ -42,8 +39,6 @@ const ChatResultsCell: React.FC<ChatResults> = ({ })(); }, [thumbnail_url]); - const dispatch = useDispatch(); - const state: RootState = useStore().getState(); const navigation = useNavigation(); const createChannelIfNotPresentAndNavigate = async () => { try { |