diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-10-18 16:37:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-18 19:37:32 -0400 |
commit | ab7fa09af967e0a8cf2ca53dfb24f8bc8a6886f7 (patch) | |
tree | 898e7aa42529eda91964ac1a18aa1881689554f2 /src/screens/profile/ProfileScreen.tsx | |
parent | 79d237f616c37940f5d476eb1dca6b5d05cf148a (diff) |
[TMA 279] Ability to search and view someone's profile (#58)
* Batch one : major changes
* WIP checkpoint
* The one before the final touch
* Probable final touch
* ran yarn lint D:
* linter broke something
* fixed a small bug
* Addressed a small nitpick
* Well abstracted now
Co-authored-by: Ivan Chen <ivan@thetaggid.com>
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 /> </> ); |