aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/Content.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r--src/components/profile/Content.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx
index 05098d14..0d2a0331 100644
--- a/src/components/profile/Content.tsx
+++ b/src/components/profile/Content.tsx
@@ -1,4 +1,10 @@
-import React, {useCallback, useEffect, useRef, useState} from 'react';
+import React, {
+ useCallback,
+ useContext,
+ useEffect,
+ useRef,
+ useState,
+} from 'react';
import {LayoutChangeEvent, RefreshControl, StyleSheet} from 'react-native';
import Animated, {
useSharedValue,
@@ -31,6 +37,7 @@ import ProfileCutout from './ProfileCutout';
import ProfileHeader from './ProfileHeader';
import PublicProfile from './PublicProfile';
import {useScrollToTop} from '@react-navigation/native';
+import {ChatContext} from '../../App';
interface ContentProps {
userXId: string | undefined;
@@ -52,6 +59,8 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
);
const state: RootState = useStore().getState();
+ const {chatClient} = useContext(ChatContext);
+
/*
* Used to imperatively scroll to the top when presenting the moment tutorial.
*/
@@ -75,7 +84,7 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => {
const refrestState = async () => {
setRefreshing(true);
if (!userXId) {
- await userLogin(dispatch, loggedInUser);
+ await userLogin(dispatch, loggedInUser, chatClient);
} else {
await fetchUserX(dispatch, user, screenType);
}