aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfileHeader.tsx
diff options
context:
space:
mode:
authorHusam Salhab <47015061+hsalhab@users.noreply.github.com>2020-10-26 18:42:02 -0400
committerGitHub <noreply@github.com>2020-10-26 18:42:02 -0400
commit17fbfa29c1b78703b872221e3b590aca3ef5cf7e (patch)
treeed3ede72471f117f7bb81da47b9e6276eaa01f55 /src/components/profile/ProfileHeader.tsx
parent61bcb48511095d5568a013429b0092c57659df0e (diff)
[TMA-13] List of following (#72)
* move async-storage * removed lock files * added lock files to gitignore * added the wrong file to gitignore * added following list * added numFollowers; removed redundant code * removed followercount stuff for now * Fixed follower count * Made come more changes Co-authored-by: Ashm Walia <ashmwalia@outlook.com>
Diffstat (limited to 'src/components/profile/ProfileHeader.tsx')
-rw-r--r--src/components/profile/ProfileHeader.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 25789525..f3ef5dfa 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -5,12 +5,15 @@ import FollowCount from './FollowCount';
import {View, Text, StyleSheet} from 'react-native';
import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
import {AuthContext, ProfileContext} from '../../routes/';
+import { ProfilePreviewType } from 'src/types';
type ProfileHeaderProps = {
- isProfileView: boolean;
+ isProfileView: boolean,
+ numFollowing: number,
+ numFollowers: number;
};
-const ProfileHeader: React.FC<ProfileHeaderProps> = ({isProfileView}) => {
+const ProfileHeader: React.FC<ProfileHeaderProps> = ({isProfileView, numFollowing, numFollowers}) => {
const {
profile: {name},
} = isProfileView
@@ -26,13 +29,13 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({isProfileView}) => {
<FollowCount
style={styles.follows}
mode="followers"
- count={318412}
+ count={numFollowers}
isProfileView={isProfileView}
/>
<FollowCount
style={styles.follows}
mode="following"
- count={1036}
+ count={numFollowing}
isProfileView={isProfileView}
/>
</View>