From 08ba9f4d7bef85b223d2cf6772804e3c9190cad7 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 23 Apr 2021 14:09:18 -0700 Subject: fixed alignment issue --- src/components/profile/BadgeTutorialScreen.tsx | 6 +++++- src/components/profile/ProfileHeader.tsx | 22 ++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'src') 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 = ({ layout, university, university_class, + setShowBadgeTutorial, }) => { const [showModal, setShowModal] = useState(true); @@ -26,7 +27,10 @@ const BadgeTutorialScreen: React.FC = ({ visible={showModal} presentationStyle="overFullScreen"> setShowModal(false)} + onPress={() => { + setShowBadgeTutorial(false); + setShowModal(false); + }} style={styles.viewWrapper}> 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 = ({ 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 = ({ university={university} university_class={university_class} layout={measure} + setShowBadgeTutorial={setShowBadgeTutorial} /> )} @@ -107,13 +107,18 @@ const ProfileHeader: React.FC = ({ setBadgeViewVisible(true)}> - + {showBadgeTutorial === true ? ( + + ) : ( + + )} {showBadgeView && ( @@ -163,6 +168,7 @@ const styles = StyleSheet.create({ width: '100%', height: 50, }, + emptyContainer: {backgroundColor: 'white', width: 50, height: 50}, }); export default ProfileHeader; -- cgit v1.2.3-70-g09d2