You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
9.4 KiB

2 months ago
import React from "react";
1 month ago
import Toast from 'react-native-toast-message';
2 months ago
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { CountrySelect } from "./app/screens/CountrySelect";
import { MainApp } from "./app/screens/MainApp";
import { LoginScreen } from "./app/screens/LoginScreen";
import { EmailLoginScreen } from "./app/screens/EmailLoginScreen";
1 month ago
import { GoogleScreen } from "./app/screens/login/Google";
2 months ago
import "./app/i18n";
import { TabNavigator } from "./app/navigation/TabNavigator";
import { AuthProvider } from "./app/contexts/AuthContext";
import { SearchScreen } from "./app/screens/SearchScreen";
import { SearchResultScreen } from "./app/screens/SearchResultScreen";
import { ProductDetailScreen } from "./app/screens/ProductDetailScreen";
import { BalanceScreen } from "./app/screens/BalanceScreen";
import { ShippingDetailsSection } from "./app/screens/ShippingDetailsSection";
import { GestureHandlerRootView } from "react-native-gesture-handler";
1 month ago
import { InquiryScreen } from "./app/screens/InquiryScreen/InquiryScreen";
2 months ago
import { Recipient } from "./app/screens/Recipient/Recipient";
import { AddRess } from "./app/screens/Recipient/Address";
1 month ago
import { SettingList } from "./app/screens/setting/SettingList";
import { CountrySetting } from "./app/screens/setting/CountrySetting";
import { MySetting } from "./app/services/api/setting";
1 month ago
import { MyAddress } from "./app/screens/setting/MyAddress";
import { CartScreen } from "./app/screens/CartScreen";
import { PaymentSuccessScreen } from "./app/screens/pay/PaySuccess";
1 month ago
import { MyAccount } from "./app/screens/MyAccount/myAccount";
import { ConfirmOrder } from "./app/screens/Recipient/ConfirmOrder";
1 month ago
import { Pay } from "./app/screens/pay/Pay";
import { Status } from "./app/screens/productStatus/Status";
import { OrderDetails } from "./app/screens/productStatus/OrderDatails";
2 months ago
export type RootStackParamList = {
CountrySelect: undefined;
MainApp: undefined;
Login: undefined;
EmailLogin: undefined;
MainTabs: undefined;
Search: undefined;
SearchResult: { keyword: string };
ProductDetail: { productId: string; searchKeyword?: string };
2 months ago
Balance: undefined;
ShippingDetailsSection: undefined;
2 months ago
InquiryScreen: undefined;
1 month ago
Recipient: { items: { cart_item_id: number }[] };
2 months ago
AddRess:undefined;
1 month ago
SettingList:undefined;
CountrySetting: { mySetting?: MySetting };
1 month ago
MyAddress:undefined;
CartScreen:undefined;
PaymentSuccessScreen:undefined;
1 month ago
MyAccount:undefined;
1 month ago
Google: undefined;
ConfirmOrder: undefined;
1 month ago
Pay: undefined;
Status: undefined;
OrderDetails: undefined;
2 months ago
};
const Stack = createNativeStackNavigator<RootStackParamList>();
export default function App() {
return (
2 months ago
<GestureHandlerRootView style={{ flex: 1 }}>
<AuthProvider>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
2 months ago
>
<Stack.Screen name="CountrySelect" component={CountrySelect} />
2 months ago
<Stack.Screen
name="Login"
2 months ago
component={LoginScreen}
1 month ago
options={{
2 months ago
presentation: "modal",
animation: "slide_from_bottom",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "vertical",
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="MainTabs"
2 months ago
component={TabNavigator}
options={{
2 months ago
gestureEnabled: false,
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="EmailLogin"
2 months ago
component={EmailLoginScreen}
options={{
2 months ago
presentation: "modal",
animation: "slide_from_bottom",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "vertical",
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="Search"
2 months ago
component={SearchScreen}
options={{
2 months ago
presentation: "fullScreenModal",
animation: "fade",
2 months ago
animationDuration: 200,
gestureEnabled: true,
2 months ago
gestureDirection: "vertical",
contentStyle: { backgroundColor: "#ffffff" },
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="SearchResult"
2 months ago
component={SearchResultScreen}
options={{
2 months ago
animation: "slide_from_right",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "horizontal",
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="ProductDetail"
2 months ago
component={ProductDetailScreen}
options={{
2 months ago
animation: "slide_from_right",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "horizontal",
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="Balance"
2 months ago
component={BalanceScreen}
options={{
2 months ago
animation: "slide_from_right",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "horizontal",
2 months ago
}}
/>
2 months ago
<Stack.Screen
name="ShippingDetailsSection"
2 months ago
component={ShippingDetailsSection}
options={{
2 months ago
animation: "slide_from_right",
2 months ago
gestureEnabled: true,
2 months ago
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="InquiryScreen"
component={InquiryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Recipient"
component={Recipient}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="AddRess"
component={AddRess}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
2 months ago
}}
/>
1 month ago
<Stack.Screen
name="SettingList"
component={SettingList}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CountrySetting"
component={CountrySetting}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
1 month ago
<Stack.Screen
name="MyAddress"
component={MyAddress}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CartScreen"
component={CartScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="PaymentSuccessScreen"
component={PaymentSuccessScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
1 month ago
<Stack.Screen
name="MyAccount"
component={MyAccount}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
1 month ago
<Stack.Screen
name="Google"
component={GoogleScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ConfirmOrder"
component={ConfirmOrder}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
1 month ago
<Stack.Screen
name="Pay"
component={Pay}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Status"
component={Status}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="OrderDetails"
component={OrderDetails}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
2 months ago
</Stack.Navigator>
</NavigationContainer>
</AuthProvider>
1 month ago
<Toast />
2 months ago
</GestureHandlerRootView>
);
}