diff options
Diffstat (limited to 'src/components/profile/Content.tsx')
-rw-r--r-- | src/components/profile/Content.tsx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index a3b9e74a..8d368747 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -1,5 +1,6 @@ import React, {useState} from 'react'; import {LayoutChangeEvent, StyleSheet, View} from 'react-native'; +import {Text} from 'react-native-animatable'; import Animated from 'react-native-reanimated'; import {defaultMoments} from '../../constants'; import {SCREEN_HEIGHT} from '../../utils'; @@ -11,8 +12,9 @@ import ProfileHeader from './ProfileHeader'; interface ContentProps { y: Animated.Value<number>; + isProfileView: boolean; } -const Content: React.FC<ContentProps> = ({y}) => { +const Content: React.FC<ContentProps> = ({y, isProfileView}) => { const [profileBodyHeight, setProfileBodyHeight] = useState(0); const onLayout = (e: LayoutChangeEvent) => { const {height} = e.nativeEvent.layout; @@ -26,15 +28,19 @@ const Content: React.FC<ContentProps> = ({y}) => { scrollEventThrottle={1} stickyHeaderIndices={[2, 4]}> <ProfileCutout> - <ProfileHeader /> + <ProfileHeader {...{isProfileView}} /> </ProfileCutout> - <ProfileBody {...{onLayout}} /> - <TaggsBar {...{y, profileBodyHeight}} /> - <View style={styles.momentsContainer}> - {defaultMoments.map((title, index) => ( - <Moment key={index} title={title} images={[]} /> - ))} - </View> + <ProfileBody {...{onLayout, isProfileView}} /> + <TaggsBar {...{y, profileBodyHeight, isProfileView}} /> + {!isProfileView ? ( + <View style={styles.momentsContainer}> + {defaultMoments.map((title, index) => ( + <Moment key={index} title={title} images={[]} /> + ))} + </View> + ) : ( + <React.Fragment /> + )} </Animated.ScrollView> ); }; |