diff options
-rw-r--r-- | src/components/profile/BadgeTutorialScreen.tsx | 6 | ||||
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 22 |
2 files changed, 19 insertions, 9 deletions
diff --git a/src/components/profile/BadgeTutorialScreen.tsx b/src/components/profile/BadgeTutorialScreen.tsx index 360162f8..e2dab00d 100644 --- a/src/components/profile/BadgeTutorialScreen.tsx +++ b/src/components/profile/BadgeTutorialScreen.tsx @@ -16,6 +16,7 @@ const BadgeTutorialScreen: React.FC<UniversityIconProps> = ({ layout, university, university_class, + setShowBadgeTutorial, }) => { const [showModal, setShowModal] = useState(true); @@ -26,7 +27,10 @@ const BadgeTutorialScreen: React.FC<UniversityIconProps> = ({ visible={showModal} presentationStyle="overFullScreen"> <TouchableOpacity - onPress={() => setShowModal(false)} + onPress={() => { + setShowBadgeTutorial(false); + setShowModal(false); + }} style={styles.viewWrapper}> <View style={styles.textContainerStyles}> <Text style={styles.textStyles}> 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; |