diff options
Diffstat (limited to 'src/components/suggestedPeople/BadgesDropdown.tsx')
-rw-r--r-- | src/components/suggestedPeople/BadgesDropdown.tsx | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/src/components/suggestedPeople/BadgesDropdown.tsx b/src/components/suggestedPeople/BadgesDropdown.tsx index 0d4725d9..50f924e4 100644 --- a/src/components/suggestedPeople/BadgesDropdown.tsx +++ b/src/components/suggestedPeople/BadgesDropdown.tsx @@ -5,7 +5,7 @@ import {TouchableOpacity} from 'react-native-gesture-handler'; import LinearGradient from 'react-native-linear-gradient'; import Animated, {Easing} from 'react-native-reanimated'; import {UniversityType, UniversityBadge} from '../../types'; -import {UniversityIcon} from '..'; +import {BadgeIcon, UniversityIcon} from '..'; import {normalize, SCREEN_WIDTH} from '../../utils'; import UniversityIconClicked from './UniversityIconClicked'; @@ -105,30 +105,7 @@ const BadgesDropdown: React.FC<BadgesDropdownProps> = ({ zIndex: -1 * badge.id, }, ]}> - <TouchableOpacity - style={styles.badgeButton} - onPress={() => { - navigation.navigate('MutualBadgeHolders', { - badge_id: badge.id, - badge_title: badge.name, - badge_img: img, - }); - }}> - <LinearGradient - colors={['#4E3629', '#EC2027']} - useAngle={true} - angle={154.72} - angleCenter={{x: 0.5, y: 0.5}} - style={styles.badgeBackground}> - <Image - source={img} - style={{ - width: SCREEN_WIDTH * 0.04, - height: SCREEN_WIDTH * 0.04, - }} - /> - </LinearGradient> - </TouchableOpacity> + <BadgeIcon badge={badge} img={img} /> </Animated.View> ))} </Animated.View> @@ -136,18 +113,6 @@ const BadgesDropdown: React.FC<BadgesDropdownProps> = ({ }; const styles = StyleSheet.create({ - badgeBackground: { - position: 'absolute', - width: '100%', - height: '100%', - borderRadius: 50, - borderColor: 'transparent', - borderWidth: 1, - alignSelf: 'center', - flexDirection: 'row', - justifyContent: 'center', - alignItems: 'center', - }, badgesContainer: { flexDirection: 'column', justifyContent: 'space-between', @@ -156,12 +121,9 @@ const styles = StyleSheet.create({ left: '5%', paddingBottom: '2%', }, - badgeButton: { - width: 30, - height: 30, - borderRadius: 15, + animatedBadgeView: { + position: 'absolute', }, - animatedBadgeView: {position: 'absolute'}, universityIconContainer: { width: normalize(31), height: normalize(38), |