diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-03-29 18:17:46 -0400 | 
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-03-29 18:17:46 -0400 | 
| commit | d5669f3d08bee68b37f51727e499e84610685422 (patch) | |
| tree | 8de9664c49e63833504aafd69ca8f965249d412d /src/components/profile/ProfileBody.tsx | |
| parent | d1e5d18c36af46b450ec7d019550c05b1a78f2db (diff) | |
| parent | b0e4fe55be8983079f499b923e953855afeb2c64 (diff) | |
Merge branch 'master' into tma739-bugfix-profile-onboarding-tutorial
# Conflicts:
#	src/components/profile/Content.tsx
Diffstat (limited to 'src/components/profile/ProfileBody.tsx')
| -rw-r--r-- | src/components/profile/ProfileBody.tsx | 19 | 
1 files changed, 6 insertions, 13 deletions
| diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 646be3e0..b49e71a3 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -2,21 +2,17 @@ import React from 'react';  import {LayoutChangeEvent, Linking, StyleSheet, Text, View} from 'react-native';  import {normalize} from 'react-native-elements';  import {useDispatch, useSelector, useStore} from 'react-redux'; -import { -  TAGG_DARK_BLUE, -  TAGG_LIGHT_BLUE, -  TOGGLE_BUTTON_TYPE, -} from '../../constants'; +import {TAGG_DARK_BLUE, TOGGLE_BUTTON_TYPE} from '../../constants';  import {    acceptFriendRequest,    declineFriendRequest,    updateUserXFriends,    updateUserXProfileAllScreens,  } from '../../store/actions'; -import {NO_PROFILE, NO_USER} from '../../store/initialStates'; +import {NO_PROFILE} from '../../store/initialStates';  import {RootState} from '../../store/rootReducer';  import {ScreenType} from '../../types'; -import {getUserAsProfilePreviewType, SCREEN_WIDTH} from '../../utils'; +import {getUserAsProfilePreviewType} from '../../utils';  import {FriendsButton} from '../common';  import ToggleButton from './ToggleButton'; @@ -34,12 +30,8 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({    userXId,    screenType,  }) => { -  const {profile = NO_PROFILE, user} = userXId -    ? useSelector((state: RootState) => state.userX[screenType][userXId]) -    : useSelector((state: RootState) => state.user); - -  const {user: loggedInUser = NO_USER} = useSelector( -    (state: RootState) => state.user, +  const {profile = NO_PROFILE, user} = useSelector((state: RootState) => +    userXId ? state.userX[screenType][userXId] : state.user,    );    const { @@ -119,6 +111,7 @@ const styles = StyleSheet.create({      flex: 1,      paddingTop: '3.5%',      paddingBottom: '2%', +    width: '50%',    },    container: {      paddingVertical: '1%', | 
