diff options
Diffstat (limited to 'src/components/taggs')
-rw-r--r-- | src/components/taggs/SocialMediaInfo.tsx | 7 | ||||
-rw-r--r-- | src/components/taggs/Tagg.tsx | 41 | ||||
-rw-r--r-- | src/components/taggs/TaggsBar.tsx | 19 |
3 files changed, 48 insertions, 19 deletions
diff --git a/src/components/taggs/SocialMediaInfo.tsx b/src/components/taggs/SocialMediaInfo.tsx index c25d0297..46e651f9 100644 --- a/src/components/taggs/SocialMediaInfo.tsx +++ b/src/components/taggs/SocialMediaInfo.tsx @@ -1,5 +1,6 @@ import React from 'react'; import {StyleSheet, Text, View} from 'react-native'; +import { ScreenType } from '../../types'; import {SocialIcon} from '..'; import {handleOpenSocialUrlOnBrowser} from '../../utils'; @@ -30,7 +31,11 @@ const SocialMediaInfo: React.FC<SocialMediaInfoProps> = ({ )} <View style={styles.row}> <View /> - <SocialIcon style={styles.icon} social={type} /> + <SocialIcon + style={styles.icon} + social={type} + screenType={ScreenType.Profile} + /> <Text style={styles.name} onPress={() => { diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index cba7777a..bb450b64 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -5,6 +5,7 @@ import PurpleRingPlus from '../../assets/icons/purple_ring+.svg'; import PurpleRing from '../../assets/icons/purple_ring.svg'; import RingPlus from '../../assets/icons/ring+.svg'; import Ring from '../../assets/icons/ring.svg'; +import WhiteRing from '../../assets/icons/ring-white.svg'; import { INTEGRATED_SOCIAL_LIST, SOCIAL_ICON_SIZE_ADJUSTMENT, @@ -16,7 +17,7 @@ import { registerNonIntegratedSocialLink, } from '../../services'; import {SmallSocialIcon, SocialIcon, SocialLinkModal} from '../common'; -import {UserType} from '../../types'; +import {ScreenType, UserType} from '../../types'; import { ERROR_LINK, ERROR_UNABLE_TO_FIND_PROFILE, @@ -32,6 +33,7 @@ interface TaggProps { setSocialDataNeedUpdate: (social: string, username: string) => void; userXId: string | undefined; user: UserType; + screenType: ScreenType; } const Tagg: React.FC<TaggProps> = ({ @@ -42,6 +44,7 @@ const Tagg: React.FC<TaggProps> = ({ setSocialDataNeedUpdate, userXId, user, + screenType, }) => { const navigation = useNavigation(); const [modalVisible, setModalVisible] = useState(false); @@ -97,6 +100,8 @@ const Tagg: React.FC<TaggProps> = ({ const pickTheRightRingHere = () => { if (youMayPass) { + if (screenType === ScreenType.SuggestedPeople) + return <WhiteRing width={TAGG_RING_DIM} height={TAGG_RING_DIM} />; if (social === 'Tagg') { return <Ring width={TAGG_RING_DIM} height={TAGG_RING_DIM} />; } else { @@ -140,21 +145,27 @@ const Tagg: React.FC<TaggProps> = ({ <TouchableOpacity style={styles.iconTap} onPress={modalOrAuthBrowserOrPass}> - <SocialIcon style={styles.icon} social={social} /> - {pickTheRightRingHere()} - </TouchableOpacity> - <View style={styles.smallIconContainer}> - <SmallSocialIcon - style={[ - styles.smallIcon, - { - height: SOCIAL_ICON_SIZE_ADJUSTMENT[social], - width: SOCIAL_ICON_SIZE_ADJUSTMENT[social], - }, - ]} + <SocialIcon + style={styles.icon} social={social} + screenType={screenType} /> - </View> + {pickTheRightRingHere()} + </TouchableOpacity> + {screenType !== ScreenType.SuggestedPeople && ( + <View style={styles.smallIconContainer}> + <SmallSocialIcon + style={[ + styles.smallIcon, + { + height: SOCIAL_ICON_SIZE_ADJUSTMENT[social], + width: SOCIAL_ICON_SIZE_ADJUSTMENT[social], + }, + ]} + social={social} + /> + </View> + )} </View> </> )} @@ -166,7 +177,7 @@ const styles = StyleSheet.create({ container: { justifyContent: 'space-between', alignItems: 'center', - marginHorizontal: 15, + marginRight: 34, height: normalize(90), }, iconTap: { diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index 76833d65..e7bdb0f2 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -72,11 +72,12 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ isIntegrated={INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1} setTaggsNeedUpdate={setTaggsNeedUpdate} setSocialDataNeedUpdate={handleSocialUpdate} + screenType={screenType} />, ); i++; } - if (!userXId) { + if (!userXId && screenType !== ScreenType.SuggestedPeople) { for (let social of unlinkedSocials) { new_taggs.push( <Tagg @@ -88,6 +89,7 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ setSocialDataNeedUpdate={handleSocialUpdate} userXId={userXId} user={user} + screenType={screenType} />, ); i++; @@ -122,7 +124,12 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ }); return taggs.length > 0 ? ( - <View style={[styles.container, {shadowOpacity, paddingTop}]}> + <View + style={ + screenType === ScreenType.SuggestedPeople + ? [styles.spContainer] + : [styles.container, {shadowOpacity, paddingTop}] + }> <ScrollView horizontal showsHorizontalScrollIndicator={false} @@ -136,6 +143,13 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ }; const styles = StyleSheet.create({ + spContainer: { + shadowColor: '#000', + shadowRadius: 10, + shadowOffset: {width: 0, height: 2}, + zIndex: 1, + paddingBottom: 5, + }, container: { backgroundColor: 'white', shadowColor: '#000', @@ -146,7 +160,6 @@ const styles = StyleSheet.create({ }, contentContainer: { alignItems: 'center', - paddingHorizontal: 5, paddingBottom: 5, }, }); |