diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-04-09 17:15:29 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-04-09 17:15:29 -0400 |
| commit | 347e9e450268e4897b8dd241721b84945d9e2ec9 (patch) | |
| tree | 58334be3724398c886365e99901e4442f5657172 /src/screens/profile/ProfileScreen.tsx | |
| parent | 097b515066f1a0c38cb7fb69cf78b16b945594e5 (diff) | |
| parent | 3ec56863bfdd47b2ee8d0f0fe5a45be779508660 (diff) | |
Merge branch 'master' into tma756-bugfix-onpress-tagg-on-sp
# Conflicts:
# src/components/taggs/TaggsBar.tsx
Diffstat (limited to 'src/screens/profile/ProfileScreen.tsx')
| -rw-r--r-- | src/screens/profile/ProfileScreen.tsx | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/screens/profile/ProfileScreen.tsx b/src/screens/profile/ProfileScreen.tsx index 313e2f2c..6d9ef020 100644 --- a/src/screens/profile/ProfileScreen.tsx +++ b/src/screens/profile/ProfileScreen.tsx @@ -1,17 +1,8 @@ import React from 'react'; import {StatusBar} from 'react-native'; -import Animated from 'react-native-reanimated'; -import {Content, Cover, TabsGradient} from '../../components'; -import {RouteProp, useFocusEffect} from '@react-navigation/native'; +import {Content, TabsGradient} from '../../components'; +import {RouteProp} from '@react-navigation/native'; import {MainStackParams} from '../../routes/'; -import {resetScreenType} from '../../store/actions'; -import {useDispatch, useStore} from 'react-redux'; -import {DUMMY_USERID} from '../../store/initialStates'; - -/**r - * Profile Screen for a user's profile - * including posts, messaging, and settings - */ type ProfileScreenRouteProps = RouteProp<MainStackParams, 'Profile'>; @@ -22,32 +13,11 @@ interface ProfileOnboardingProps { const ProfileScreen: React.FC<ProfileOnboardingProps> = ({route}) => { const {screenType} = route.params; let {userXId} = route.params; - const y = Animated.useValue(0); - const dispatch = useDispatch(); - - /** - * This is a double safety check to avoid app crash. - * Checks if the required userXId is present in the store, if not userXId is set to dummy id - */ - // if (userXId && !(userXId in useStore().getState().userX[screenType])) { - // userXId = DUMMY_USERID; - // } - - /** - * Code under useFocusEffect gets executed every time the screen comes under focus / is being viewed by the user. - * This is done to reset the users stored in our store for the Search screen. - * Read more about useFocusEffect here : https://reactnavigation.org/docs/function-after-focusing-screen/ - */ - // useFocusEffect(() => { - // if (!userXId) { - // dispatch(resetScreenType(screenType)); - // } - // }); return ( <> <StatusBar barStyle="dark-content" /> - <Content {...{y, userXId, screenType}} /> + <Content {...{userXId, screenType}} /> <TabsGradient /> </> ); |
