diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2461564..4ae8bc2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -19,7 +19,7 @@ android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true"> - + @@ -27,9 +27,11 @@ - + + + diff --git a/src/components/JoinedGroupCard.tsx b/src/components/JoinedGroupCard.tsx index 08383b0..e2f9a52 100644 --- a/src/components/JoinedGroupCard.tsx +++ b/src/components/JoinedGroupCard.tsx @@ -22,7 +22,7 @@ interface JoinedGroup { } interface JoinedGroupCardProps { - item: JoinedGroup; + item: JoinedGroup | any; } // Helper function to format dates diff --git a/src/components/common/Custom.tsx b/src/components/common/Custom.tsx index fcd837e..5855ceb 100644 --- a/src/components/common/Custom.tsx +++ b/src/components/common/Custom.tsx @@ -14,7 +14,7 @@ import colors from "../colors"; type CustomInputProps = TextInputProps & { label?: string; icon?: IoniconsIconName; - error:string + error?:string }; const CustomInput: React.FC = ({ diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx new file mode 100644 index 0000000..b2c63a8 --- /dev/null +++ b/src/components/common/Header.tsx @@ -0,0 +1,62 @@ +import React from "react"; +import { View, Text, TouchableOpacity, StyleSheet } from "react-native"; +import { useNavigation } from "@react-navigation/native"; +import { Ionicons } from "@react-native-vector-icons/ionicons" + +type HeaderProps = { + title: string; + showBack?: boolean; // optional, default true + onBackPress?: () => void; // optional custom back action +}; + +const Header: React.FC = ({ + title, + showBack = true, + onBackPress, +}) => { + const navigation = useNavigation(); + + const handleBack = () => { + if (onBackPress) { + onBackPress(); + } else { + navigation.goBack(); + } + }; + + return ( + + {showBack && ( + + + + )} + {title} + + ); +}; + +export default Header; + +const styles = StyleSheet.create({ + header: { + flexDirection: "row", + alignItems: "center", + paddingHorizontal: 16, + paddingVertical: 12, + backgroundColor: "#fff", + shadowColor: "#000", + shadowOpacity: 0.05, + shadowOffset: { width: 0, height: 2 }, + shadowRadius: 6, + elevation: 3, + }, + backButton: { + marginRight: 12, + }, + headerTitle: { + fontSize: 18, + fontWeight: "600", + color: "#000", + }, +}); diff --git a/src/navigation/AppNavigator.tsx b/src/navigation/AppNavigator.tsx index 7d05f0e..25d7039 100644 --- a/src/navigation/AppNavigator.tsx +++ b/src/navigation/AppNavigator.tsx @@ -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,48 +10,47 @@ 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"; +import EditBankDetails from "../screens/profile/EditBankDetails"; -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; + EditBankDetails: { currentBankName: string | null; currentAccountNumber: string | null; currentBranchCode: string | null }; }; -function HomeScreen() { - return ( - - Home Screen -