aboutsummaryrefslogtreecommitdiff
path: root/src/components/suggestedPeople/BadgesDropdown.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-25 12:36:12 -0400
committerIvan Chen <ivan@tagg.id>2021-05-25 12:36:12 -0400
commit9df26f5ff25b4a6953518639d7dfcd16a03802a3 (patch)
tree68bb26d03f27f488f84a3d40902705e2ac3c9d6c /src/components/suggestedPeople/BadgesDropdown.tsx
parent913e321498b87163a19fa12e95d79fcd4d1b0b29 (diff)
Clean up code, Refactor
Diffstat (limited to 'src/components/suggestedPeople/BadgesDropdown.tsx')
-rw-r--r--src/components/suggestedPeople/BadgesDropdown.tsx46
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),