diff --git a/src/navigations/BottomTabs.tsx b/src/navigations/AppBottomTabsNavigator.tsx similarity index 96% rename from src/navigations/BottomTabs.tsx rename to src/navigations/AppBottomTabsNavigator.tsx index b651222..b5ec146 100644 --- a/src/navigations/BottomTabs.tsx +++ b/src/navigations/AppBottomTabsNavigator.tsx @@ -1,6 +1,4 @@ -import { Entypo } from "@expo/vector-icons"; -import { FontAwesome } from "@expo/vector-icons"; -import { Ionicons } from "@expo/vector-icons"; +import { Entypo, FontAwesome, Ionicons } from "@expo/vector-icons"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { useTheme } from "@shopify/restyle"; // import palette @@ -10,7 +8,7 @@ import Text from "../components/bases/Text"; import PaymentStackNavigator from "./PaymentStackNavigation"; const Tab = createBottomTabNavigator(); -export const BottomTabs = () => { +export const AppBottomTabsNavigator = () => { const theme = useTheme(); return ( diff --git a/src/navigations/UnloggedUserStackNavigation.tsx b/src/navigations/AppMainStackNavigator.tsx similarity index 66% rename from src/navigations/UnloggedUserStackNavigation.tsx rename to src/navigations/AppMainStackNavigator.tsx index 88fdb5a..22086b3 100644 --- a/src/navigations/UnloggedUserStackNavigation.tsx +++ b/src/navigations/AppMainStackNavigator.tsx @@ -1,12 +1,12 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"; import HomeUserNotLoggedIn from "@screens/HomeUserNotLoggedIn"; import UserLoginScreen from "@screens/UserLoginScreen"; -import { BottomTabs } from "./BottomTabs"; -import type { UnloggedUserStackParamList } from "./Types"; +import { AppBottomTabsNavigator } from "./AppBottomTabsNavigator"; +import type { ImainStackNavigator } from "./Types"; -const Stack = createNativeStackNavigator(); +const Stack = createNativeStackNavigator(); -const UnloggedUserStackNavigation = () => { +const AppMainStackNavigator = () => { return ( { > - + ); }; -export default UnloggedUserStackNavigation; +export default AppMainStackNavigator; diff --git a/src/navigations/InitialNavigationHandler.tsx b/src/navigations/InitialNavigationHandler.tsx index 5562e4d..186f7e0 100644 --- a/src/navigations/InitialNavigationHandler.tsx +++ b/src/navigations/InitialNavigationHandler.tsx @@ -1,11 +1,11 @@ import { useUserAuthenticationContext } from "@/contexts/UserAuthenticationContext"; -import UnloggedUserStackNavigation from "./UnloggedUserStackNavigation"; +import AppMainStackNavigator from "./AppMainStackNavigator"; const InitialNavigationHandler = () => { const { isAuthenticated } = useUserAuthenticationContext(); console.log("isAuthenticated", isAuthenticated); - return ; + return ; }; export default InitialNavigationHandler; diff --git a/src/navigations/PaymentStackNavigation.tsx b/src/navigations/PaymentStackNavigation.tsx index 5cea561..a5aee6a 100644 --- a/src/navigations/PaymentStackNavigation.tsx +++ b/src/navigations/PaymentStackNavigation.tsx @@ -3,9 +3,9 @@ import HomePageWithPaymentOptions from "@screens/HomePageWithPaymentOptions"; import NumberAndOtpForPaymentScreen from "@screens/NumberAndOtpForPaymentScreen"; import PaymentAmountInputScreen from "@screens/PaymentAmountInputScreen"; import PaymentResultScreen from "@screens/PaymentResultScreen"; -import type { PaymentStackParamList } from "./Types"; +import type { IpaymentStackNavigator } from "./Types"; -const Stack = createNativeStackNavigator(); +const Stack = createNativeStackNavigator(); const PaymentStackNavigator = () => { return ( diff --git a/src/navigations/Types.ts b/src/navigations/Types.ts index 6cd3f30..604c7e1 100644 --- a/src/navigations/Types.ts +++ b/src/navigations/Types.ts @@ -1,35 +1,33 @@ import type { PaymentCode } from "@/utils/requests/Types"; import type { NativeStackScreenProps } from "@react-navigation/native-stack"; -export type PaymentStackParamList = { +export type IpaymentStackNavigator = { homePageWithPaymentOptions: undefined; numberAndOtpForPaymentScreen: undefined; paymentAmountInputScreen: { paymentType: PaymentCode; }; - homeUserNotLoggedIn: undefined; - userLoginScreen: undefined; + // homeUserNotLoggedIn: undefined; + // userLoginScreen: undefined; paymentResultScreen: undefined; }; -export type PaymentStackScreenProps = NativeStackScreenProps< - PaymentStackParamList, - T, - "PaymentStackParamList" ->; +export type PaymentStackScreenProps = + NativeStackScreenProps; -export type PaymentStackScreenComponentProps = React.FC< +export type PaymentStackScreenComponentProps = React.FC< PaymentStackScreenProps >; -export type UnloggedUserStackParamList = { +export type ImainStackNavigator = { homeUserNotLoggedIn: undefined; userLoginScreen: undefined; - bottomTabs: undefined; + appBottomTabsNavigator: undefined; }; -export type UnloggedUserStackScreenProps = - NativeStackScreenProps; +export type UnloggedUserStackScreenProps = + NativeStackScreenProps; -export type UnloggedUserStackScreenComponentProps = - React.FC>; +export type UnloggedUserStackScreenComponentProps = React.FC< + UnloggedUserStackScreenProps +>; diff --git a/src/screens/HomeUserNotLoggedIn.tsx b/src/screens/HomeUserNotLoggedIn.tsx index cb67422..2415fc8 100644 --- a/src/screens/HomeUserNotLoggedIn.tsx +++ b/src/screens/HomeUserNotLoggedIn.tsx @@ -10,7 +10,7 @@ const HomeUserNotLoggedIn: UnloggedUserStackScreenComponentProps<"homeUserNotLog const { isAuthenticated } = useUserAuthenticationContext(); if (isAuthenticated) { - navigation.replace("bottomTabs"); + navigation.replace("appBottomTabsNavigator"); } return (