From 5e3be59bce1017c536d9bf232000296d541b2b73 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 18 Feb 2021 11:30:21 -0800 Subject: justify changed for alignment --- src/components/common/FriendsButton.tsx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/components/common/FriendsButton.tsx b/src/components/common/FriendsButton.tsx index a1e107c5..46421bd1 100644 --- a/src/components/common/FriendsButton.tsx +++ b/src/components/common/FriendsButton.tsx @@ -128,6 +128,7 @@ const styles = StyleSheet.create({ row: { flex: 1, flexDirection: 'row', + justifyContent: 'space-between', }, }); -- cgit v1.2.3-70-g09d2 From 7695e36491fdd076cd4f388c7258f3bf52cf0a10 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 19 Feb 2021 11:31:48 -0800 Subject: fixed --- src/components/profile/Content.tsx | 12 +++----- src/components/taggs/Tagg.tsx | 6 ++-- src/routes/Routes.tsx | 2 +- .../suggestedPeople/SuggestedPeopleScreen.tsx | 32 ++++++++++++---------- 4 files changed, 27 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index 86d40f1b..d047cc2f 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -109,10 +109,9 @@ const Content: React.FC = ({y, userXId, screenType}) => { const [isStageOnePromptClosed, setIsStageOnePromptClosed] = useState( false, ); - const [ - isStageThreePromptClosed, - setIsStageThreePromptClosed, - ] = useState(false); + const [isStageThreePromptClosed, setIsStageThreePromptClosed] = useState< + boolean + >(false); const onRefresh = useCallback(() => { const refrestState = async () => { @@ -309,9 +308,7 @@ const Content: React.FC = ({y, userXId, screenType}) => { isBlocked, }} /> - - - + {userXId && moments.length === 0 && ( @@ -418,7 +415,6 @@ const styles = StyleSheet.create({ color: 'gray', marginVertical: '8%', }, - taggsbarContainer: {paddingHorizontal: 15}, }); export default Content; diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 66694132..1ab09055 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -182,13 +182,15 @@ const styles = StyleSheet.create({ spcontainer: { justifyContent: 'space-between', alignItems: 'center', - marginRight: 34, + marginRight: 15, + marginLeft: 19, height: normalize(60), }, container: { justifyContent: 'space-between', alignItems: 'center', - marginRight: 34, + marginRight: 15, + marginLeft: 15, height: normalize(90), }, iconTap: { diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx index 1cbc9bc5..bf137445 100644 --- a/src/routes/Routes.tsx +++ b/src/routes/Routes.tsx @@ -39,7 +39,7 @@ const Routes: React.FC = () => { }); if (!userId) { - userLogin(dispatch, {userId: '', username: ''}); + // userLogin(dispatch, {userId: '', username: ''}); } else { SplashScreen.hide(); } diff --git a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx index 3437cd85..129ea1e8 100644 --- a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx +++ b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx @@ -59,18 +59,20 @@ const SuggestedPeopleScreen: React.FC = () => { Suggested People - - - {firstName} - {username} - - console.log('Call add friend function')}> - - {'Add Friend'} + + + + {firstName} + {username} - + console.log('Call add friend function')}> + + {'Add Friend'} + + + { profileBodyHeight={0} screenType={ScreenType.SuggestedPeople} /> - + + + @@ -95,12 +99,12 @@ const SuggestedPeopleScreen: React.FC = () => { const styles = StyleSheet.create({ mainContainer: { flexDirection: 'column', - width: SCREEN_WIDTH * 0.9, + width: SCREEN_WIDTH, height: isIPhoneX() ? SCREEN_HEIGHT * 0.85 : SCREEN_HEIGHT * 0.88, justifyContent: 'space-between', alignSelf: 'center', - marginHorizontal: '5%', }, + marginManager: {marginHorizontal: '5%'}, image: { position: 'absolute', width: SCREEN_WIDTH, -- cgit v1.2.3-70-g09d2 From 921cf232551ea6e04bc2d845805f4b59419df085 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 19 Feb 2021 22:04:46 -0800 Subject: white ring on profile screen fixed --- src/components/common/SocialIcon.tsx | 7 +++--- src/components/taggs/Tagg.tsx | 26 ++++++++-------------- src/components/taggs/TaggsBar.tsx | 11 +++++---- .../suggestedPeople/SuggestedPeopleScreen.tsx | 1 + 4 files changed, 20 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/components/common/SocialIcon.tsx b/src/components/common/SocialIcon.tsx index 8216b6ff..cb3b926b 100644 --- a/src/components/common/SocialIcon.tsx +++ b/src/components/common/SocialIcon.tsx @@ -1,11 +1,10 @@ import React from 'react'; import {Image} from 'react-native'; -import {ScreenType} from '../../types'; interface SocialIconProps { social: string; style: object; - screenType: ScreenType; + whiteRing: boolean | undefined; } /** * An image component that returns the of the icon for a specific social media platform. @@ -13,12 +12,12 @@ interface SocialIconProps { const SocialIcon: React.FC = ({ social: social, style: style, - screenType, + whiteRing, }) => { switch (social) { case 'Instagram': var icon = require('../../assets/socials/instagram-icon.png'); - if (screenType === ScreenType.SuggestedPeople) { + if (whiteRing) { icon = require('../../assets/socials/instagram-icon-white-bg.png'); } break; diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 66694132..50651f74 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -1,5 +1,5 @@ import {useNavigation} from '@react-navigation/native'; -import React, {Fragment, useContext, useEffect, useState} from 'react'; +import React, {Fragment, useState} from 'react'; import {Alert, Linking, StyleSheet, TouchableOpacity, View} from 'react-native'; import PurpleRingPlus from '../../assets/icons/purple_ring+.svg'; import PurpleRing from '../../assets/icons/purple_ring.svg'; @@ -17,7 +17,7 @@ import { registerNonIntegratedSocialLink, } from '../../services'; import {SmallSocialIcon, SocialIcon, SocialLinkModal} from '../common'; -import {ScreenType, UserType} from '../../types'; +import {UserType} from '../../types'; import { ERROR_LINK, ERROR_UNABLE_TO_FIND_PROFILE, @@ -33,7 +33,7 @@ interface TaggProps { setSocialDataNeedUpdate: (social: string, username: string) => void; userXId: string | undefined; user: UserType; - screenType: ScreenType; + whiteRing: boolean | undefined; } const Tagg: React.FC = ({ @@ -44,7 +44,7 @@ const Tagg: React.FC = ({ setSocialDataNeedUpdate, userXId, user, - screenType, + whiteRing, }) => { const navigation = useNavigation(); const [modalVisible, setModalVisible] = useState(false); @@ -100,8 +100,9 @@ const Tagg: React.FC = ({ const pickTheRightRingHere = () => { if (youMayPass) { - if (screenType === ScreenType.SuggestedPeople) + if (whiteRing) { return ; + } if (social === 'Tagg') { return ; } else { @@ -141,23 +142,14 @@ const Tagg: React.FC = ({ setModalVisible={setModalVisible} completionCallback={linkNonIntegratedSocial} /> - + - + {pickTheRightRingHere()} - {screenType !== ScreenType.SuggestedPeople && ( + {!whiteRing && ( = ({ y, profileBodyHeight, userXId, screenType, + whiteRing, }) => { let [taggs, setTaggs] = useState([]); let [taggsNeedUpdate, setTaggsNeedUpdate] = useState(true); @@ -61,6 +63,7 @@ const TaggsBar: React.FC = ({ ); let new_taggs = []; let i = 0; + console.log('whiteRing in taggsbar: ', whiteRing); for (let social of linkedSocials) { new_taggs.push( = ({ isIntegrated={INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1} setTaggsNeedUpdate={setTaggsNeedUpdate} setSocialDataNeedUpdate={handleSocialUpdate} - screenType={screenType} + whiteRing={whiteRing ? whiteRing : undefined} />, ); i++; } - if (!userXId && screenType !== ScreenType.SuggestedPeople) { + if (!userXId && !whiteRing) { for (let social of unlinkedSocials) { new_taggs.push( = ({ setSocialDataNeedUpdate={handleSocialUpdate} userXId={userXId} user={user} - screenType={screenType} + whiteRing ={whiteRing ? whiteRing : undefined} />, ); i++; @@ -126,7 +129,7 @@ const TaggsBar: React.FC = ({ return taggs.length > 0 ? ( diff --git a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx index 3437cd85..c81c4f8c 100644 --- a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx +++ b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx @@ -77,6 +77,7 @@ const SuggestedPeopleScreen: React.FC = () => { userXId={undefined} profileBodyHeight={0} screenType={ScreenType.SuggestedPeople} + whiteRing={true} /> -- cgit v1.2.3-70-g09d2 From 064437a278cf368038c79816319e076d477397e4 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Sat, 20 Feb 2021 10:31:14 -0500 Subject: fixed issues --- src/components/profile/Content.tsx | 7 ++++--- src/routes/Routes.tsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index d047cc2f..e75ae949 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -109,9 +109,10 @@ const Content: React.FC = ({y, userXId, screenType}) => { const [isStageOnePromptClosed, setIsStageOnePromptClosed] = useState( false, ); - const [isStageThreePromptClosed, setIsStageThreePromptClosed] = useState< - boolean - >(false); + const [ + isStageThreePromptClosed, + setIsStageThreePromptClosed, + ] = useState(false); const onRefresh = useCallback(() => { const refrestState = async () => { diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx index bf137445..1cbc9bc5 100644 --- a/src/routes/Routes.tsx +++ b/src/routes/Routes.tsx @@ -39,7 +39,7 @@ const Routes: React.FC = () => { }); if (!userId) { - // userLogin(dispatch, {userId: '', username: ''}); + userLogin(dispatch, {userId: '', username: ''}); } else { SplashScreen.hide(); } -- cgit v1.2.3-70-g09d2 From a2cd0be38858241b00956a5aa5715b3213084db0 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Sat, 20 Feb 2021 10:44:24 -0500 Subject: linting and removed logging --- src/components/taggs/TaggsBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index aaf9a531..05ee18bb 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -63,7 +63,6 @@ const TaggsBar: React.FC = ({ ); let new_taggs = []; let i = 0; - console.log('whiteRing in taggsbar: ', whiteRing); for (let social of linkedSocials) { new_taggs.push( = ({ setSocialDataNeedUpdate={handleSocialUpdate} userXId={userXId} user={user} - whiteRing ={whiteRing ? whiteRing : undefined} + whiteRing={whiteRing ? whiteRing : undefined} />, ); i++; -- cgit v1.2.3-70-g09d2