From 704c6c6bada682ec7e9008a775f4719fd1d0bd00 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 21 Jan 2021 15:00:39 -0500 Subject: fixed isIPhoneX and adjusted spacing --- src/components/profile/Content.tsx | 9 +++++---- src/components/profile/ProfileBody.tsx | 1 - src/components/profile/ProfileHeader.tsx | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/components') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index e7fb566b..82803a7a 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -113,9 +113,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 () => { @@ -284,7 +285,7 @@ const Content: React.FC = ({y, userXId, screenType}) => { momentCategories.filter((mc) => mc !== category), false, ), - ) + ); dispatch(deleteUserMomentsForCategory(category)); }, }, diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 6284ff59..0b00481b 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -162,7 +162,6 @@ const styles = StyleSheet.create({ fontWeight: '600', fontSize: 16.5, marginBottom: '1%', - marginTop: '-3%', }, biography: { fontSize: 16, diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 8d502d97..9c91c079 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -2,6 +2,7 @@ import React, {useState} from 'react'; import {StyleSheet, Text, View} from 'react-native'; import {useSelector} from 'react-redux'; import {UniversityIcon} from '.'; +import {PROFILE_CUTOUT_TOP_Y} from '../../constants'; import {NO_MOMENTS} from '../../store/initialStates'; import {RootState} from '../../store/rootreducer'; import {ScreenType} from '../../types'; @@ -78,7 +79,7 @@ const ProfileHeader: React.FC = ({ const styles = StyleSheet.create({ container: { - top: SCREEN_HEIGHT / 2.4, + top: PROFILE_CUTOUT_TOP_Y * 0.96, width: '100%', position: 'absolute', }, -- cgit v1.2.3-70-g09d2