aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-04-23 14:16:52 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-04-23 14:16:52 -0700
commit70ff4dc0c8d8fa7b05087c6dbc08f2def895b922 (patch)
tree157aeb092533cfd2a5ef4d7a5ecea78169eba297 /src
parentad99a4434ada452e4b068a8c537b1d2e89d08ada (diff)
Added interface
Diffstat (limited to 'src')
-rw-r--r--src/components/profile/BadgeTutorialScreen.tsx13
-rw-r--r--src/components/profile/ProfileHeader.tsx8
-rw-r--r--src/components/profile/UniversityIcon.tsx1
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;
}
/**