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.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx
index f86d8331..7afc3fbc 100644
--- a/src/components/profile/Content.tsx
+++ b/src/components/profile/Content.tsx
@@ -23,6 +23,7 @@ const Content: React.FC<ContentProps> = ({y, isProfileView}) => {
const {user, moments, followers, following, updateFollowers} = isProfileView
? React.useContext(ProfileContext)
: React.useContext(AuthContext);
+
const {logout} = React.useContext(AuthContext);
const {
user: loggedInUser,
@@ -71,7 +72,7 @@ const Content: React.FC<ContentProps> = ({y, isProfileView}) => {
}, [createImagesMap]);
/**
- * This hook is called load of profile and when you push update the followers list.
+ * This hook is called on load of profile and when you update the followers list.
*/
useEffect(() => {
if (!userId) {
@@ -87,6 +88,7 @@ const Content: React.FC<ContentProps> = ({y, isProfileView}) => {
/**
* Handles a click on the follow / unfollow button.
+ * updateFollowers and updateLoggedInUerFollowers to make sure that we update followers list / count for both the users in context.
*/
const handleFollowUnfollow = async () => {
const token = await AsyncStorage.getItem('token');