homePage update

This commit is contained in:
Abin Toppo
2025-09-25 15:46:17 +05:30
18 changed files with 1079 additions and 508 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export type RootStackParamList = {
GroupCreation: undefined;
GroupReview: undefined;
EditGroup: { groupId: string | number };
GroupDetails: { groupId: string | number };
GroupDetails: { item:object };
BecomeOrg: undefined;
YourContacts: undefined;
Transaction: undefined;
+17 -19
View File
@@ -1,5 +1,5 @@
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { BottomTabNavigationProp, createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { View, Text, StyleSheet, Platform } from "react-native";
import { Ionicons, IoniconsIconName } from "@react-native-vector-icons/ionicons";
import GroupScreen from "../screens/GroupScreen";
@@ -9,7 +9,6 @@ import colors from "../components/colors";
import Setting from "../screens/setting/Setting";
import ManagementScreen from "../screens/management/ManagementScreen";
const Tab = createBottomTabNavigator();
const TAB_CONFIG = {
activeColor: "#000",
@@ -29,26 +28,24 @@ const activeTabColors: { [key: string]: string } = {
// Icon/Text colors on active tabs
const activeIconColors: { [key: string]: string } = {
Home: "#333",
Profile: "#333",
Group: "#333",
Management: "#333",
Home: "#333",
Profile: "#333",
Group: "#333",
Management: "#333",
}
function HomeScreen() {
return (
<View style={styles.screen}><Text style={styles.text}>🏠 Home</Text></View>
);
}
export type RootTabParamList = {
Home: undefined;
Profile: undefined;
Group: undefined;
Management: { actionTab?: "My Groups" | "Joined Groups" | "Requests" | "Your Requests" };
};
// Define the navigation prop type for screens within the tab navigator
export type TabNavigationProp = BottomTabNavigationProp<RootTabParamList>;
const Tab = createBottomTabNavigator<RootTabParamList>();
function SettingsScreen() {
return (
<View style={styles.screen}><Text style={styles.text}>⚙️ Settings</Text></View>
);
}
export default function BottomTabs() {
const BottomTabs: React.FC = () => {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
@@ -62,7 +59,7 @@ export default function BottomTabs() {
tabBarIcon: ({ focused }) => {
let iconName: IoniconsIconName = "home-outline";
// Determine icon based on route
if (route.name === "Home") iconName = focused ? "home" : "home-outline";
else if (route.name === "Profile") iconName = focused ? "person" : "person-outline";
@@ -151,3 +148,4 @@ const styles = StyleSheet.create({
shadowRadius: 5,
},
});
export default BottomTabs
+42
View File
@@ -0,0 +1,42 @@
// navigation/types.ts
import { NavigatorScreenParams } from '@react-navigation/native';
import { StackScreenProps } from '@react-navigation/stack';
// Type for the parameters passed to each screen in the Bottom Tab Navigator
export type RootTabParamList = {
Home: undefined;
Profile: undefined;
Group: undefined;
Management: { actionTab?: "My Groups" | "Joined Groups" | "Requests" | "Your Requests" };
};
// Type for the parameters passed to each screen in the main Stack Navigator
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: { item:object };
BecomeOrg: undefined;
YourContacts: undefined;
Transaction: undefined;
EditBankDetails: { currentBankName: string | null; currentAccountNumber: string | null; currentBranchCode: string | null };
ManageJoinedGroup: { groupId: string | number };
Invite: { groupId: string | number; code: string | number };
ManagementTabs:any
};
// Helper type for screens within the main stack navigator
export type AppStackScreenProps<T extends keyof RootStackParamList> = StackScreenProps<
RootStackParamList,
T
>;