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/taggs/Tagg.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/taggs/Tagg.tsx')
-rw-r--r-- | src/components/taggs/Tagg.tsx | 56 |
1 files changed, 6 insertions, 50 deletions
diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 4a58bacb..0e0311c5 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -5,13 +5,8 @@ import {useSelector} from 'react-redux'; import PurpleRingPlus from '../../assets/icons/purple_ring+.svg'; import PurpleRing from '../../assets/icons/purple_ring.svg'; import RingPlus from '../../assets/icons/ring+.svg'; -import WhiteRing from '../../assets/icons/ring-white.svg'; import Ring from '../../assets/icons/ring.svg'; -import { - INTEGRATED_SOCIAL_LIST, - SOCIAL_ICON_SIZE_ADJUSTMENT, - TAGG_RING_DIM, -} from '../../constants'; +import {INTEGRATED_SOCIAL_LIST, TAGG_RING_DIM} from '../../constants'; import { ERROR_LINK, ERROR_UNABLE_TO_FIND_PROFILE, @@ -24,8 +19,8 @@ import { } from '../../services'; import {RootState} from '../../store/rootReducer'; import {ScreenType, UserType} from '../../types'; -import {canViewProfile, normalize} from '../../utils'; -import {SmallSocialIcon, SocialIcon, SocialLinkModal} from '../common'; +import {canViewProfile} from '../../utils'; +import {SocialIcon, SocialLinkModal} from '../common'; interface TaggProps { social: string; @@ -35,7 +30,6 @@ interface TaggProps { setSocialDataNeedUpdate: (social: string, username: string) => void; userXId: string | undefined; user: UserType; - whiteRing: boolean | undefined; screenType: ScreenType; } @@ -48,7 +42,6 @@ const Tagg: React.FC<TaggProps> = ({ userXId, screenType, user, - whiteRing, }) => { const navigation = useNavigation(); const state = useSelector((s: RootState) => s); @@ -107,9 +100,6 @@ const Tagg: React.FC<TaggProps> = ({ const pickTheRightRingHere = () => { if (youMayPass) { - if (whiteRing) { - return <WhiteRing width={TAGG_RING_DIM} height={TAGG_RING_DIM} />; - } if (social === 'Tagg') { return <Ring width={TAGG_RING_DIM} height={TAGG_RING_DIM} />; } else { @@ -139,7 +129,7 @@ const Tagg: React.FC<TaggProps> = ({ return ( <> - {(userXId && !isLinked) || (whiteRing && !userXId) ? ( + {userXId && !isLinked ? ( <Fragment /> ) : ( <> @@ -149,27 +139,13 @@ const Tagg: React.FC<TaggProps> = ({ setModalVisible={setModalVisible} completionCallback={linkNonIntegratedSocial} /> - <View style={whiteRing ? styles.spcontainer : styles.container}> + <View style={styles.container}> <TouchableOpacity style={styles.iconTap} onPress={modalOrAuthBrowserOrPass}> <SocialIcon style={styles.icon} social={social} whiteRing /> {pickTheRightRingHere()} </TouchableOpacity> - {!whiteRing && ( - <View style={styles.smallIconContainer}> - <SmallSocialIcon - style={[ - styles.smallIcon, - { - height: SOCIAL_ICON_SIZE_ADJUSTMENT[social], - width: SOCIAL_ICON_SIZE_ADJUSTMENT[social], - }, - ]} - social={social} - /> - </View> - )} </View> </> )} @@ -178,19 +154,10 @@ const Tagg: React.FC<TaggProps> = ({ }; const styles = StyleSheet.create({ - spcontainer: { - justifyContent: 'space-between', - alignItems: 'center', - marginRight: 15, - marginLeft: 19, - height: normalize(60), - }, container: { justifyContent: 'space-between', alignItems: 'center', - marginRight: 15, - marginLeft: 15, - height: normalize(90), + marginHorizontal: 15, }, iconTap: { justifyContent: 'center', @@ -202,17 +169,6 @@ const styles = StyleSheet.create({ borderRadius: 30, position: 'absolute', }, - smallIconContainer: { - height: 20, - width: 20, - position: 'absolute', - justifyContent: 'center', - alignItems: 'center', - bottom: 0, - }, - smallIcon: { - borderRadius: 1000, - }, }); export default Tagg; |