From c115fd43c8adb31f1266306974711a3bbe18d20c Mon Sep 17 00:00:00 2001 From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Date: Mon, 2 Nov 2020 10:22:16 -0800 Subject: Reflect follow / unfollow on logged in user's profile (#87) --- src/components/profile/Content.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index a0af1e94..f86d8331 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -24,7 +24,10 @@ const Content: React.FC = ({y, isProfileView}) => { ? React.useContext(ProfileContext) : React.useContext(AuthContext); const {logout} = React.useContext(AuthContext); - const {user: loggedInUser} = React.useContext(AuthContext); + const { + user: loggedInUser, + updateFollowers: updateLoggedInUserFollowers, + } = React.useContext(AuthContext); /** * States @@ -100,6 +103,7 @@ const Content: React.FC = ({y, isProfileView}) => { if (isUpdatedSuccessful) { setFollowed(!followed); updateFollowers(true); + updateLoggedInUserFollowers(true); } }; -- cgit v1.2.3-70-g09d2