aboutsummaryrefslogtreecommitdiff
path: root/src/screens/chat/ChatResultsCell.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-09 13:27:45 -0400
committerIvan Chen <ivan@tagg.id>2021-04-09 13:27:45 -0400
commitc54a25dc05eeb70780bc3a3ec05cb8cbed3f334b (patch)
tree9c5eba5cbdf0d8989022e723613795560374256b /src/screens/chat/ChatResultsCell.tsx
parent0ebd64161da70d5d417886d7026ec8e0f4691db3 (diff)
code cleanup
Diffstat (limited to 'src/screens/chat/ChatResultsCell.tsx')
-rw-r--r--src/screens/chat/ChatResultsCell.tsx9
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 {