aboutsummaryrefslogtreecommitdiff
path: root/src/routes/profile/Profile.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/profile/Profile.tsx')
-rw-r--r--src/routes/profile/Profile.tsx26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/routes/profile/Profile.tsx b/src/routes/profile/Profile.tsx
index 736127bf..8ab8ecde 100644
--- a/src/routes/profile/Profile.tsx
+++ b/src/routes/profile/Profile.tsx
@@ -5,11 +5,25 @@ import {
SocialMediaTaggs,
SearchScreen,
ProfileScreen,
+ MomentCommentsScreen,
} from '../../screens';
import {ProfileStack, ProfileStackParams} from './ProfileStack';
import {RouteProp} from '@react-navigation/native';
import {AvatarTitle} from '../../components';
+/**
+ * What will be the First Screen of the stack depends on value of isProfileView (Search if its true else Profile)
+ * Trying to explain the purpose of each route on the stack (ACTUALLY A STACK)
+ * Profile : To display the logged in user's profile when isProfileView is false, else displays profile of any user the logged in user wants to view.
+ * ProfileView : To display profile of a commenter / any user who has commented on a photo.
+ * When you click on the profile icon after looking at a user's profile, the stack is reset and you come back to the top of the stack (First screen : Profile in this case)
+ * Search : To display the search screen. Search for a user on this screen, click on a result tile and navigate to the same (isProfileView = true).
+ * When you click on the search icon after looking at a user's profile, the stack gets reset and you come back to the top of the stack (First screen : Search in this case)
+ * SocialMediaTaggs : To display user data for any social media account set up by the user.
+ * IndividualMoment : To display individual images uploaded by the user (Navigate to comments from this screen, click on a commenter's profile pic / username, look at a user's profile. Click on the profile icon again to come back to your own profile).
+ * MomentCommentsScreen : Displays comments posted by users on an image uploaded by the user.
+ */
+
type ProfileStackRouteProps = RouteProp<ProfileStackParams, 'Profile'>;
interface ProfileStackProps {
@@ -76,6 +90,18 @@ const Profile: React.FC<ProfileStackProps> = ({route}) => {
options={{headerShown: false}}
initialParams={{isProfileView: isProfileView}}
/>
+ <ProfileStack.Screen
+ name="ProfileView"
+ component={ProfileScreen}
+ options={{headerShown: false}}
+ initialParams={{isProfileView: isProfileView}}
+ />
+ <ProfileStack.Screen
+ name="MomentCommentsScreen"
+ component={MomentCommentsScreen}
+ options={{headerShown: false}}
+ initialParams={{isProfileView: isProfileView}}
+ />
</ProfileStack.Navigator>
);
};