From 0cb19c5b173d4cf6ba67378cbffd61abac7f18c3 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> Date: Tue, 8 Dec 2020 20:18:07 -0800 Subject: [TMA-338, TMA-400] Zoom out on profile page and adjust follow/block button touchable opacity (#132) * changed dimensions of username, bio, website, moment tiles; Changed padding in profile body; Added padding between moment tiles; * adjusted spacing between profile cutout and body * adjusting space below profile cutout accoring to device * Ensuring userId exists before loading taggs * Made tagg icons responsive according to device dimensions * shoft profile picture to the left * Fix bug * small * flex * flex remove * Shrunk taggs bar icons and readjusted padding around it Co-authored-by: Ashm Walia --- src/components/taggs/Tagg.tsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/components/taggs/Tagg.tsx') diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 8158cbac..4c8f8226 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -8,7 +8,6 @@ import Ring from '../../assets/icons/ring.svg'; import { INTEGRATED_SOCIAL_LIST, SOCIAL_ICON_SIZE_ADJUSTMENT, - TAGG_ICON_DIM, TAGG_RING_DIM, } from '../../constants'; import { @@ -17,9 +16,7 @@ import { registerNonIntegratedSocialLink, } from '../../services'; import {SmallSocialIcon, SocialIcon, SocialLinkModal} from '../common'; -import {useSelector} from 'react-redux'; -import {RootState} from '../../store/rootreducer'; -import {ScreenType} from '../../types'; +import {UserType} from '../../types'; interface TaggProps { social: string; @@ -28,7 +25,7 @@ interface TaggProps { setTaggsNeedUpdate: (_: boolean) => void; setSocialDataNeedUpdate: (social: string, username: string) => void; userXId: string; - screenType: ScreenType; + user: UserType; } const Tagg: React.FC = ({ @@ -38,14 +35,12 @@ const Tagg: React.FC = ({ setTaggsNeedUpdate, setSocialDataNeedUpdate, userXId, - screenType, + user, }) => { const navigation = useNavigation(); const [modalVisible, setModalVisible] = useState(false); const youMayPass = isLinked || userXId; - const {user} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.user); + /* case isProfileView: case linked: @@ -160,27 +155,28 @@ const Tagg: React.FC = ({ const styles = StyleSheet.create({ container: { - justifyContent: 'center', + justifyContent: 'space-between', alignItems: 'center', marginHorizontal: 15, + height: 90, }, iconTap: { justifyContent: 'center', alignItems: 'center', }, icon: { - width: TAGG_ICON_DIM, - height: TAGG_ICON_DIM, - borderRadius: TAGG_ICON_DIM / 2, + width: '77%', + height: '77%', + borderRadius: 30, position: 'absolute', }, smallIconContainer: { - height: 35, - width: 35, + height: 20, + width: 20, position: 'absolute', justifyContent: 'center', alignItems: 'center', - bottom: -35, + bottom: 0, }, smallIcon: { borderRadius: 1000, -- cgit v1.2.3-70-g09d2