aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfileBody.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/profile/ProfileBody.tsx')
-rw-r--r--src/components/profile/ProfileBody.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx
index dc68446b..e23249fa 100644
--- a/src/components/profile/ProfileBody.tsx
+++ b/src/components/profile/ProfileBody.tsx
@@ -63,7 +63,6 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
profile,
);
- const {chatClientReady} = useSelector((state: RootState) => state.user);
const {chatClient, setChannel} = useContext(ChatContext);
const state: RootState = useStore().getState();
@@ -97,8 +96,9 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({
};
const onPressMessage = async () => {
- if (!chatClientReady) {
- Alert.alert('Something wrong with chat');
+ if (!chatClient.user) {
+ // TODO: Add refresh control to retry establishing chat connection
+ Alert.alert('Unable to connect chat');
}
const channel = chatClient.channel('messaging', {
members: [loggedInUserId, String(userXId)],