73 lines
3.4 KiB
TypeScript
73 lines
3.4 KiB
TypeScript
import * as React from "react";
|
|
import { NavigationContainer } from "@react-navigation/native";
|
|
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
|
import LoginScreen from "../screens/LoginScreen";
|
|
import OtpVerificationScreen from "../screens/OtpVarificationScreen";
|
|
import SplashScreen from "../screens/SplashScreen";
|
|
import Profile from "../screens/profile/Profile";
|
|
import OrganizerRegisterScreen from "../screens/OrgnizerRagister";
|
|
import GroupCreation from "../screens/GroupCreation";
|
|
import GroupReview from "../screens/GroupReview";
|
|
import BottomTabs from "./BottomTabs";
|
|
import BecomeOrg from "../screens/profile/BecomeOrg";
|
|
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";
|
|
import EditBankDetails from "../screens/profile/EditBankDetails";
|
|
|
|
export type RootStackParamList = {
|
|
Splash: undefined;
|
|
Login: undefined;
|
|
OtpVarify: { mobile: string };
|
|
Home: undefined;
|
|
HomeTabs: undefined;
|
|
OrganizerRegister: undefined;
|
|
Profile: undefined;
|
|
GroupCreation: undefined;
|
|
GroupReview: undefined;
|
|
EditGroup: { groupId: string | number };
|
|
GroupDetails: { groupId: string | number };
|
|
BecomeOrg: undefined;
|
|
YourContacts: undefined;
|
|
Transaction: undefined;
|
|
EditBankDetails: { currentBankName: string | null; currentAccountNumber: string | null; currentBranchCode: string | null };
|
|
};
|
|
|
|
const Stack = createNativeStackNavigator<RootStackParamList>();
|
|
|
|
export default function AppNavigator() {
|
|
const linking = {
|
|
prefixes: [
|
|
"myapp://", // A custom scheme for internal or test links.
|
|
"https://192.168.1.19" // Your production domain for verified App Links.
|
|
],
|
|
config: {
|
|
screens: {
|
|
Profile: "invite",
|
|
},
|
|
},
|
|
};
|
|
|
|
return (
|
|
<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 }} />
|
|
<Stack.Screen name="Login" component={LoginScreen} options={{ headerShown: false }} />
|
|
<Stack.Screen name="OtpVarify" component={OtpVerificationScreen} options={{ headerShown: false }} />
|
|
<Stack.Screen name="OrganizerRegister" component={OrganizerRegisterScreen} options={{ headerShown: false }} />
|
|
<Stack.Screen name="Profile" component={Profile} options={{ headerShown: false }} />
|
|
<Stack.Screen name="GroupCreation" component={GroupCreation} options={{ headerShown: false }} />
|
|
<Stack.Screen name="GroupReview" component={GroupReview} options={{ headerShown: false }} />
|
|
<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="GroupDetails" component={GroupDetails} options={{ headerShown: false }} />
|
|
<Stack.Screen name="EditGroup" component={EditGroupScreen} options={{ headerShown: false }} />
|
|
<Stack.Screen name="EditBankDetails" component={EditBankDetails} options={{ headerShown: false }} />
|
|
</Stack.Navigator>
|
|
</NavigationContainer>
|
|
);
|
|
}
|