diff options
-rw-r--r-- | src/components/profile/BadgeTutorialScreen.tsx | 13 | ||||
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 8 | ||||
-rw-r--r-- | src/components/profile/UniversityIcon.tsx | 1 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/components/profile/BadgeTutorialScreen.tsx b/src/components/profile/BadgeTutorialScreen.tsx index e2dab00d..45831fc6 100644 --- a/src/components/profile/BadgeTutorialScreen.tsx +++ b/src/components/profile/BadgeTutorialScreen.tsx @@ -12,14 +12,17 @@ import {normalize} from '../../utils'; import {UniversityIcon} from './'; import {UniversityIconProps} from './UniversityIcon'; -const BadgeTutorialScreen: React.FC<UniversityIconProps> = ({ - layout, - university, - university_class, +interface BadgeTutorialScreenProps { + uniIconProps: UniversityIconProps; + setShowBadgeTutorial: Function; +} + +const BadgeTutorialScreen: React.FC<BadgeTutorialScreenProps> = ({ + uniIconProps, setShowBadgeTutorial, }) => { const [showModal, setShowModal] = useState(true); - + const {layout, university, university_class} = uniIconProps; return ( <Modal animationType="fade" diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 8411d2cc..89d41d57 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -80,9 +80,11 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ /> {measure && ( <BadgeTutorialScreen - university={university} - university_class={university_class} - layout={measure} + uniIconProps={{ + university: university, + university_class: university_class, + layout: measure, + }} setShowBadgeTutorial={setShowBadgeTutorial} /> )} diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx index 6e1c7d4e..560a771e 100644 --- a/src/components/profile/UniversityIcon.tsx +++ b/src/components/profile/UniversityIcon.tsx @@ -9,6 +9,7 @@ export interface UniversityIconProps extends ViewProps { university_class?: number; imageStyle?: StyleProp<ImageStyle>; needsShadow?: boolean; + layout?: object | null; } /** |