aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfileHeader.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2020-12-07 19:19:50 -0500
committerGitHub <noreply@github.com>2020-12-07 19:19:50 -0500
commit84616a6143fea58899eafa915a73592eaad25361 (patch)
treef99a662a1661348faa8d9836fb5a97ff687addf0 /src/components/profile/ProfileHeader.tsx
parenta6dd130d5b89650e1ff134595c071f7f9c6be114 (diff)
[TMA-409] Delete Moments (#124)
* edit profile to use HeaderHeight instead of percentage * delete moment done with TODOs for backend * actually hitting the endpoint * ops * moved isProfileView check to drawer component * misunderstood suggestion, now is better * an extra layer of indirection * fixed some bugs and code improvement
Diffstat (limited to 'src/components/profile/ProfileHeader.tsx')
-rw-r--r--src/components/profile/ProfileHeader.tsx34
1 files changed, 10 insertions, 24 deletions
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 621aae9a..677728d2 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -1,14 +1,12 @@
-import React, {useState, useContext} from 'react';
-import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
-import MoreIcon from '../../assets/icons/more_horiz-24px.svg';
-import {TAGG_DARK_BLUE} from '../../constants';
-import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
-import Avatar from './Avatar';
-import MoreInfoDrawer from './MoreInfoDrawer';
-import FollowCount from './FollowCount';
+import React, {useState} from 'react';
+import {StyleSheet, Text, View} from 'react-native';
import {useSelector} from 'react-redux';
import {RootState} from '../../store/rootreducer';
import {ScreenType} from '../../types';
+import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
+import Avatar from './Avatar';
+import FollowCount from './FollowCount';
+import ProfileMoreInfoDrawer from './ProfileMoreInfoDrawer';
type ProfileHeaderProps = {
userXId: string;
@@ -25,16 +23,10 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({userXId, screenType}) => {
return (
<View style={styles.container}>
{!userXId && (
- <>
- <TouchableOpacity
- style={styles.more}
- onPress={() => {
- setDrawerVisible(true);
- }}>
- <MoreIcon height={30} width={30} color={TAGG_DARK_BLUE} />
- </TouchableOpacity>
- <MoreInfoDrawer isOpen={drawerVisible} setIsOpen={setDrawerVisible} />
- </>
+ <ProfileMoreInfoDrawer
+ isOpen={drawerVisible}
+ setIsOpen={setDrawerVisible}
+ />
)}
<View style={styles.row}>
<Avatar
@@ -91,12 +83,6 @@ const styles = StyleSheet.create({
follows: {
marginHorizontal: SCREEN_HEIGHT / 50,
},
- more: {
- position: 'absolute',
- right: '5%',
- marginTop: '4%',
- zIndex: 1,
- },
});
export default ProfileHeader;