diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-04-23 14:09:18 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-04-23 14:09:18 -0700 |
commit | 08ba9f4d7bef85b223d2cf6772804e3c9190cad7 (patch) | |
tree | e34e92925d63f760e96c9ac78f203db31df1a232 /src/components/profile/ProfileHeader.tsx | |
parent | 4a832f8bc78e9d0c7d83edd2e7777919a5e685ad (diff) |
fixed alignment issue
Diffstat (limited to 'src/components/profile/ProfileHeader.tsx')
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 2eb5121f..8411d2cc 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -52,7 +52,6 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ const measureStuff = async () => { const badgeSeen = await hasSeenBadgeTutorial(); - console.log('BADGE SEEN', badgeSeen); if (!badgeSeen && containerRef.current && childRef.current) { childRef?.current?.measureLayout( containerRef.current, @@ -84,6 +83,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ university={university} university_class={university_class} layout={measure} + setShowBadgeTutorial={setShowBadgeTutorial} /> )} <View style={styles.row}> @@ -107,13 +107,18 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ <TouchableOpacity onPress={() => setBadgeViewVisible(true)}> <View ref={childRef}> - <UniversityIcon - {...{ - university, - university_class, - needsShadow: true, - }} - /> + {showBadgeTutorial === true ? ( + <View style={styles.emptyContainer} /> + ) : ( + <UniversityIcon + {...{ + university, + university_class, + needsShadow: true, + // textStyle: getTextColor(), + }} + /> + )} </View> </TouchableOpacity> {showBadgeView && ( @@ -163,6 +168,7 @@ const styles = StyleSheet.create({ width: '100%', height: 50, }, + emptyContainer: {backgroundColor: 'white', width: 50, height: 50}, }); export default ProfileHeader; |