login complete

This commit is contained in:
Abin Toppo
2025-09-10 16:28:58 +05:30
parent bb937d5314
commit adf6ed9730
9 changed files with 3728 additions and 34 deletions
+51
View File
@@ -0,0 +1,51 @@
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 BottomTabs from "./BottomTabs";
import SplashScreen from "../screens/SplashScreen";
const Stack = createNativeStackNavigator();
export type RootStackParamList = {
Login: undefined;
OtpVarify:{ mobile: string };
Home:undefined
HomeTabs:undefined
splash: undefined
};
function HomeScreen() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Text>Home Screen</Text>
<Button
title="Go to Profile"
/>
</View>
);
}
function ProfileScreen() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Text>Profile Screen</Text>
</View>
);
}
export default function AppNavigator() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Splash">
<Stack.Screen name="Splash" component={SplashScreen} />
<Stack.Screen name="HomeTabs" 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="Profile" component={ProfileScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
+58
View File
@@ -0,0 +1,58 @@
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { View, Text } from "react-native";
import { Ionicons } from '@react-native-vector-icons/ionicons';
const Tab = createBottomTabNavigator();
// Dummy screens for now
function HomeScreen() {
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text>🏠 Home</Text>
</View>
);
}
function ProfileScreen() {
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text>👤 Profile</Text>
</View>
);
}
function SettingsScreen() {
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text>⚙️ Settings</Text>
</View>
);
}
export default function BottomTabs() {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
headerShown: false,
tabBarShowLabel: true,
tabBarStyle: { backgroundColor: "#111", paddingBottom: 5, height: 60 },
tabBarActiveTintColor: "#FF7A00",
tabBarInactiveTintColor: "gray",
tabBarIcon: ({ color, size }) => {
let iconName: string = "home-outline";
if (route.name === "Home") iconName = "home-outline";
else if (route.name === "Profile") iconName = "person-outline";
else if (route.name === "Settings") iconName = "settings-outline";
return <Ionicons name={iconName} size={size} color={color} />;
},
})}
>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Profile" component={ProfileScreen} />
<Tab.Screen name="Settings" component={SettingsScreen} />
</Tab.Navigator>
);
}