handle user profile session

This commit is contained in:
Jaanu423
2025-09-22 13:52:38 +05:30
18 changed files with 1537 additions and 711 deletions
+18 -25
View File
@@ -1,7 +1,6 @@
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { View, Text, Button } from "react-native";
import LoginScreen from "../screens/LoginScreen";
import OtpVerificationScreen from "../screens/OtpVarificationScreen";
import SplashScreen from "../screens/SplashScreen";
@@ -11,49 +10,42 @@ import GroupCreation from "../screens/GroupCreation";
import GroupReview from "../screens/GroupReview";
import BottomTabs from "./BottomTabs";
import BecomeOrg from "../screens/profile/BecomeOrg";
import EditGroupScreen from "../screens/management/EditGroupScreen";
import YourContacts from "../screens/management/YourContacts";
import Transaction from "../screens/profile/Transaction";
import GroupDetails from "../screens/home/user-home/GroupDetails";
import EditGroupScreen from "../screens/management/EditGroupScreen";
const Stack = createNativeStackNavigator();
export type RootStackParamList = {
Splash: undefined;
Login: undefined;
OtpVarify: { mobile: string };
Home: undefined
HomeTabs: undefined
splash: undefined
OrganizerRegister: undefined
Home: undefined;
HomeTabs: undefined;
OrganizerRegister: undefined;
Profile: undefined;
GroupCreation: undefined;
GroupReview: undefined;
EditGroup: { groupId: string}
EditGroup: { groupId: string | number };
GroupDetails: { groupId: string | number };
BecomeOrg: undefined;
YourContacts: undefined;
Transaction: undefined;
};
function HomeScreen() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Text>Home Screen</Text>
<Button
title="Go to Profile"
/>
</View>
);
}
const Stack = createNativeStackNavigator<RootStackParamList>();
export default function AppNavigator() {
const linking = {
prefixes: ["myapp://", "https://api.godemo.in"], // supports both
prefixes: ["myapp://", "https://api.godemo.in"],
config: {
screens: {
Profile: "EProcurementSB", // dynamic route
Profile: "EProcurementSB",
},
},
};
return (
<NavigationContainer linking={linking} >
<NavigationContainer linking={linking}>
<Stack.Navigator initialRouteName="Splash">
<Stack.Screen name="Splash" component={SplashScreen} options={{ headerShown: false }} />
<Stack.Screen name="Home" component={BottomTabs} options={{ headerShown: false }} />
@@ -66,7 +58,8 @@ export default function AppNavigator() {
<Stack.Screen name="BecomeOrg" component={BecomeOrg} options={{ headerShown: false }} />
<Stack.Screen name="YourContacts" component={YourContacts} options={{ headerShown: false }} />
<Stack.Screen name="Transaction" component={Transaction} options={{ headerShown: false }} />
{/* <Stack.Screen name="EditGroup" component={EditGroupScreen} options={{ headerShown: false }} /> */}
<Stack.Screen name="GroupDetails" component={GroupDetails} options={{ headerShown: false }} />
<Stack.Screen name="EditGroup" component={EditGroupScreen} options={{ headerShown: false }} />
</Stack.Navigator>
</NavigationContainer>
);