diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-12 18:22:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 18:22:52 -0500 |
commit | 813e9982bed74a9ccbc3b50b7e553ed1b456c93c (patch) | |
tree | 5a8d13256be83dd955d2a66a9dc9eebd26ee25c5 /src/components | |
parent | 8bb3a254e8971428274568acdc969e4df0777409 (diff) | |
parent | 82f0448edfee2d1803098085f6710ac1eb7dcb91 (diff) |
Merge pull request #292 from IvanIFChen/tma694-edit-badges
[TMA-694] Edit Badges
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/common/TaggSquareButton.tsx | 11 | ||||
-rw-r--r-- | src/components/profile/ProfileMoreInfoDrawer.tsx | 5 | ||||
-rw-r--r-- | src/components/search/SearchCategories.tsx | 2 | ||||
-rw-r--r-- | src/components/suggestedPeople/BadgesDropdown.tsx | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/src/components/common/TaggSquareButton.tsx b/src/components/common/TaggSquareButton.tsx index 817a2690..1a1c33b3 100644 --- a/src/components/common/TaggSquareButton.tsx +++ b/src/components/common/TaggSquareButton.tsx @@ -9,14 +9,17 @@ import { ViewStyle, } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; -import {BACKGROUND_GRADIENT_MAP, TAGG_PURPLE} from '../../constants'; +import { + BACKGROUND_GRADIENT_MAP, + TAGG_LIGHT_BLUE, + TAGG_PURPLE, +} from '../../constants'; import {normalize, SCREEN_WIDTH} from '../../utils'; - interface TaggSquareButtonProps extends ViewProps { onPress: (event: GestureResponderEvent) => void; title: string; buttonStyle: 'normal' | 'large' | 'gradient'; - buttonColor: 'purple' | 'white'; + buttonColor: 'purple' | 'white' | 'blue'; labelColor: 'white' | 'blue'; style?: ViewStyle; labelStyle?: TextStyle; @@ -27,6 +30,8 @@ const TaggSquareButton: React.FC<TaggSquareButtonProps> = (props) => { switch (props.buttonColor) { case 'purple': return {backgroundColor: TAGG_PURPLE}; + case 'blue': + return {backgroundColor: TAGG_LIGHT_BLUE}; case 'white': default: return {backgroundColor: 'white'}; diff --git a/src/components/profile/ProfileMoreInfoDrawer.tsx b/src/components/profile/ProfileMoreInfoDrawer.tsx index 90f5da48..2fec5cca 100644 --- a/src/components/profile/ProfileMoreInfoDrawer.tsx +++ b/src/components/profile/ProfileMoreInfoDrawer.tsx @@ -42,7 +42,10 @@ const ProfileMoreInfoDrawer: React.FC<ProfileMoreInfoDrawerProps> = (props) => { if (suggested_people_linked === 0) { Alert.alert(ERROR_ATTEMPT_EDIT_SP); } else { - navigation.push('UpdateSPPicture'); + // Sending undefined for updatedSelectedBadges to mark that there was no update yet + navigation.push('UpdateSPPicture', { + editing: true, + }); setIsOpen(false); } }; diff --git a/src/components/search/SearchCategories.tsx b/src/components/search/SearchCategories.tsx index a71befe6..4bae27c2 100644 --- a/src/components/search/SearchCategories.tsx +++ b/src/components/search/SearchCategories.tsx @@ -1,10 +1,10 @@ import {useNavigation} from '@react-navigation/native'; import React, {useEffect, useState} from 'react'; import {StyleSheet, View} from 'react-native'; -import {GradientBorderButton} from '..'; import {getSuggestedSearchBubbleSuggestions} from '../../services/ExploreService'; import {SearchCategoryType} from '../../types'; import {SCREEN_WIDTH} from '../../utils'; +import GradientBorderButton from '../common/GradientBorderButton'; interface SearchCategoriesProps { darkStyle?: boolean; diff --git a/src/components/suggestedPeople/BadgesDropdown.tsx b/src/components/suggestedPeople/BadgesDropdown.tsx index 70c70e47..76e8e46f 100644 --- a/src/components/suggestedPeople/BadgesDropdown.tsx +++ b/src/components/suggestedPeople/BadgesDropdown.tsx @@ -71,7 +71,7 @@ const BadgesDropdown: React.FC<BadgesDropdownProps> = ({ <TouchableOpacity activeOpacity={1} onPress={() => { - const updatedBadges = !displayBadges + const updatedBadges = !displayBadges; setDisplayBadges(updatedBadges); if (updatedBadges) { animate(); |