diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-06-09 15:40:08 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-06-09 15:40:08 -0400 |
| commit | cd6e9ba609cfdbcad1365c8589e2c98d755752ad (patch) | |
| tree | 98b1e947f4ae4e306f8289e26354fb783c5ee5b5 /src/components/suggestedPeople/BadgeIcon.tsx | |
| parent | 9d7e900a89f343f7752457956f8e1d205774b910 (diff) | |
| parent | 946b1be53189487e860f37e1b422c69bb44cf0c8 (diff) | |
Merge branch 'master' into tma872-purple-indicator
# Conflicts:
# src/constants/constants.ts
# src/utils/common.ts
Diffstat (limited to 'src/components/suggestedPeople/BadgeIcon.tsx')
| -rw-r--r-- | src/components/suggestedPeople/BadgeIcon.tsx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/components/suggestedPeople/BadgeIcon.tsx b/src/components/suggestedPeople/BadgeIcon.tsx index 8f576a43..616bac93 100644 --- a/src/components/suggestedPeople/BadgeIcon.tsx +++ b/src/components/suggestedPeople/BadgeIcon.tsx @@ -1,24 +1,17 @@ import {useNavigation} from '@react-navigation/core'; import React from 'react'; -import { - Image, - ImageSourcePropType, - StyleProp, - StyleSheet, - ViewStyle, -} from 'react-native'; +import {Image, StyleProp, StyleSheet, ViewStyle} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; import LinearGradient from 'react-native-linear-gradient'; -import {UniversityBadge} from '../../types'; +import {UniversityBadgeDisplayType} from '../../types'; import {normalize} from '../../utils'; interface BadgeIconProps { - badge: UniversityBadge; - img: ImageSourcePropType; + badge: UniversityBadgeDisplayType; style?: StyleProp<ViewStyle>; } -const BadgeIcon: React.FC<BadgeIconProps> = ({badge, img, style}) => { +const BadgeIcon: React.FC<BadgeIconProps> = ({badge, style}) => { const navigation = useNavigation(); return ( <TouchableOpacity @@ -27,7 +20,7 @@ const BadgeIcon: React.FC<BadgeIconProps> = ({badge, img, style}) => { navigation.navigate('MutualBadgeHolders', { badge_id: badge.id, badge_title: badge.name, - badge_img: img, + badge_img: badge.img, }); }}> <LinearGradient @@ -36,7 +29,7 @@ const BadgeIcon: React.FC<BadgeIconProps> = ({badge, img, style}) => { angle={154.72} angleCenter={{x: 0.5, y: 0.5}} style={styles.badgeBackground}> - <Image source={img} style={styles.icon} /> + <Image source={badge.img} style={styles.icon} /> </LinearGradient> </TouchableOpacity> ); |
