diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-02-17 12:53:28 -0800 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-02-17 12:53:28 -0800 |
commit | d63929ef08530544ca238b15089b48f063301a0e (patch) | |
tree | ffea795fad06b84f07d887db6728a5d9152120b9 | |
parent | 1f7030d2721ed81c1e330f840782eeb0421d6f02 (diff) |
displays correct +count val
-rw-r--r-- | src/components/suggestedPeople/MutualFriends.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/suggestedPeople/MutualFriends.tsx b/src/components/suggestedPeople/MutualFriends.tsx index df4e3ccd..6e5280ec 100644 --- a/src/components/suggestedPeople/MutualFriends.tsx +++ b/src/components/suggestedPeople/MutualFriends.tsx @@ -18,7 +18,7 @@ const MutualFriends: React.FC = () => { const friendsPreview = friends.slice(0, 4); const username = '@' + '12345678901234'; - const count = 4; + const count = friends.length - friendsPreview.length; const [drawerVisible, setDrawerVisible] = useState(false); @@ -35,7 +35,7 @@ const MutualFriends: React.FC = () => { profilePreview={profilePreview} /> ))} - {friends && friends.length > 0 && ( + {friends && friends.length > 4 && ( <TouchableOpacity onPress={() => setDrawerVisible(true)}> <View style={styles.mutualFriendsButton}> <Text style={styles.plusSign}>+</Text> |