diff options
Diffstat (limited to 'src/screens/profile/ProfileScreen.tsx')
-rw-r--r-- | src/screens/profile/ProfileScreen.tsx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/screens/profile/ProfileScreen.tsx b/src/screens/profile/ProfileScreen.tsx index cc388ffd..7d11fa2a 100644 --- a/src/screens/profile/ProfileScreen.tsx +++ b/src/screens/profile/ProfileScreen.tsx @@ -2,20 +2,28 @@ import React from 'react'; import {StatusBar} from 'react-native'; import Animated from 'react-native-reanimated'; import {Content, Cover, TabsGradient} from '../../components'; -import {AuthContext} from '../../routes/authentication'; +import {RouteProp} from '@react-navigation/native'; +import {ProfileStackParams} from '../../routes/profile'; /** - * Profile Screen for a user's logged in profile + * Profile Screen for a user's profile * including posts, messaging, and settings */ -const ProfileScreen: React.FC = () => { - const {user} = React.useContext(AuthContext); + +type ProfileScreenRouteProps = RouteProp<ProfileStackParams, 'Profile'>; + +interface ProfileOnboardingProps { + route: ProfileScreenRouteProps; +} + +const ProfileScreen: React.FC<ProfileOnboardingProps> = ({route}) => { + const {isProfileView} = route.params; const y = Animated.useValue(0); return ( <> <StatusBar /> - <Cover {...{y, user}} /> - <Content {...{y, user}} /> + <Cover {...{y, isProfileView}} /> + <Content {...{y, isProfileView}} /> <TabsGradient /> </> ); |