ordering-ui-react-native 0.21.21 → 0.21.22-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -6
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +4 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +2 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +23 -14
- package/themes/business/src/components/DriverMap/index.tsx +4 -3
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +4 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/MapView/index.tsx +11 -7
- package/themes/business/src/components/MessagesOption/index.tsx +2 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +163 -113
- package/themes/business/src/components/OrderDetails/Business.tsx +50 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +23 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +60 -53
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
- package/themes/business/src/components/OrderSummary/index.tsx +240 -76
- package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
- package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +125 -48
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +33 -36
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +18 -13
- package/themes/business/src/components/PreviousOrders/index.tsx +80 -66
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +98 -44
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +15 -2
- package/themes/business/src/utils/index.tsx +5 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +7 -4
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -4
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +10 -6
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +4 -7
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +20 -12
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +51 -20
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +32 -9
- package/themes/original/src/components/CartContent/index.tsx +96 -58
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +190 -66
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/DatePicker/index.tsx +33 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/Favorite/index.tsx +4 -9
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +1 -1
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +6 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +2 -1
- package/themes/original/src/components/LastOrder/index.tsx +2 -1
- package/themes/original/src/components/LastOrders/index.tsx +2 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
- package/themes/original/src/components/Messages/index.tsx +9 -4
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +4 -3
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
- package/themes/original/src/components/MyOrders/index.tsx +24 -29
- package/themes/original/src/components/NavBar/index.tsx +3 -1
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +4 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +716 -668
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +28 -6
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +3 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +3 -5
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
- package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +74 -165
- package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +4 -4
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/SignupForm/index.tsx +60 -58
- package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
- package/themes/original/src/components/StripeElementsForm/index.tsx +72 -59
- package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +125 -77
- package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
- package/themes/original/src/components/UserProfile/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +8 -9
- package/themes/original/src/components/Wallets/styles.tsx +1 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -5
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +1 -0
- package/themes/original/src/utils/index.tsx +125 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AppState } from 'react-native'
|
|
3
|
-
import { createStackNavigator } from "@react-navigation/stack";
|
|
4
|
-
import { useSession, useOrder, useWebsocket } from 'ordering-components/native';
|
|
5
|
-
import BottomNavigator from '../navigators/BottomNavigator';
|
|
6
|
-
import RootNavigator from '../navigators/RootNavigator';
|
|
7
|
-
import CheckoutNavigator from '../navigators/CheckoutNavigator';
|
|
8
|
-
import BackgroundTimer from 'react-native-background-timer';
|
|
9
|
-
|
|
10
|
-
import AddressList from '../pages/AddressList';
|
|
11
|
-
import AddressForm from '../pages/AddressForm';
|
|
12
|
-
import OrderDetails from '../pages/OrderDetails';
|
|
13
|
-
import BusinessProductsList from '../pages/BusinessProductsList';
|
|
14
|
-
import ReviewOrder from '../pages/ReviewOrder'
|
|
15
|
-
import ReviewProducts from '../pages/ReviewProducts';
|
|
16
|
-
import ReviewDriver from '../pages/ReviewDriver'
|
|
17
|
-
import MomentOption from '../pages/MomentOption'
|
|
18
|
-
import Account from '../pages/Account'
|
|
19
|
-
import Help from '../pages/Help'
|
|
20
|
-
import HelpOrder from '../pages/HelpOrder'
|
|
21
|
-
import HelpGuide from '../pages/HelpGuide'
|
|
22
|
-
import HelpAccountAndPayment from '../pages/HelpAccountAndPayment'
|
|
23
|
-
import Sessions from '../pages/Sessions';
|
|
24
|
-
import Splash from '../pages/Splash';
|
|
25
|
-
import ProductDetails from '../pages/ProductDetails';
|
|
26
|
-
import MultiOrdersDetails from '../pages/MultiOrdersDetails';
|
|
27
|
-
const Stack = createStackNavigator();
|
|
28
|
-
|
|
29
|
-
const HomeNavigator = (e : any) => {
|
|
30
|
-
const [orderState] = useOrder();
|
|
31
|
-
const [{ auth, user }] = useSession();
|
|
32
|
-
const socket = useWebsocket();
|
|
33
|
-
|
|
34
|
-
const appState = React.useRef(AppState.currentState);
|
|
35
|
-
let interval: any
|
|
36
|
-
|
|
37
|
-
const _handleAppStateChange = (nextAppState: any) => {
|
|
38
|
-
if (appState.current.match(/inactive|background/) && nextAppState === 'active') {
|
|
39
|
-
BackgroundTimer.clearInterval(interval)
|
|
40
|
-
}else{
|
|
41
|
-
interval = BackgroundTimer.setInterval(()=>{
|
|
42
|
-
const ordersRoom = user?.level === 0 ? 'orders' : `orders_${user?.id}`
|
|
43
|
-
socket.join(ordersRoom)
|
|
44
|
-
}, 5000)
|
|
45
|
-
appState.current = nextAppState;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
React.useEffect (() => {
|
|
50
|
-
AppState.addEventListener('change', _handleAppStateChange);
|
|
51
|
-
return () => {
|
|
52
|
-
AppState.removeEventListener('change', _handleAppStateChange);
|
|
53
|
-
};
|
|
54
|
-
},[])
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Stack.Navigator>
|
|
58
|
-
{!orderState.loading || (orderState?.options?.user_id && orderState.loading) || orderState?.options?.address?.location ? (
|
|
59
|
-
<>
|
|
60
|
-
{auth ? (
|
|
61
|
-
<>
|
|
62
|
-
{Object.keys(orderState?.carts).length === 0 && !orderState?.options?.address?.location && !orderState.loading ? (
|
|
63
|
-
<>
|
|
64
|
-
<Stack.Screen
|
|
65
|
-
name="AddressListInitial"
|
|
66
|
-
component={AddressList}
|
|
67
|
-
options={{ headerShown: false }}
|
|
68
|
-
initialParams={{ afterSignup: true }}
|
|
69
|
-
/>
|
|
70
|
-
<Stack.Screen
|
|
71
|
-
name="AddressFormInitial"
|
|
72
|
-
component={AddressForm}
|
|
73
|
-
options={{ headerShown: false }}
|
|
74
|
-
initialParams={{ afterSignup: true }}
|
|
75
|
-
/>
|
|
76
|
-
</>
|
|
77
|
-
) : (
|
|
78
|
-
<>
|
|
79
|
-
{!!Object.keys(e?.route?.params?.productLogin || {})?.length && (
|
|
80
|
-
<Stack.Screen
|
|
81
|
-
name="BusinessAfterLogin"
|
|
82
|
-
component={BusinessProductsList}
|
|
83
|
-
options={{headerShown: false}}
|
|
84
|
-
initialParams={{productLogin: e?.route?.params?.productLogin}}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
<Stack.Screen
|
|
88
|
-
name='BottomTab'
|
|
89
|
-
component={BottomNavigator}
|
|
90
|
-
options={{ headerShown: false }}
|
|
91
|
-
/>
|
|
92
|
-
<Stack.Screen
|
|
93
|
-
name="CheckoutNavigator"
|
|
94
|
-
component={CheckoutNavigator}
|
|
95
|
-
options={{ headerShown: false }}
|
|
96
|
-
/>
|
|
97
|
-
<Stack.Screen
|
|
98
|
-
name="OrderDetails"
|
|
99
|
-
component={OrderDetails}
|
|
100
|
-
options={{ headerShown: false }}
|
|
101
|
-
/>
|
|
102
|
-
<Stack.Screen
|
|
103
|
-
name="Business"
|
|
104
|
-
component={BusinessProductsList}
|
|
105
|
-
options={{ headerShown: false }}
|
|
106
|
-
/>
|
|
107
|
-
<Stack.Screen
|
|
108
|
-
name="ProductDetails"
|
|
109
|
-
component={ProductDetails}
|
|
110
|
-
options={{ headerShown: false }}
|
|
111
|
-
/>
|
|
112
|
-
<Stack.Screen
|
|
113
|
-
name="ReviewOrder"
|
|
114
|
-
component={ReviewOrder}
|
|
115
|
-
options={{ headerShown: false }}
|
|
116
|
-
/>
|
|
117
|
-
<Stack.Screen
|
|
118
|
-
name="ReviewProducts"
|
|
119
|
-
component={ReviewProducts}
|
|
120
|
-
options={{ headerShown: false }}
|
|
121
|
-
/>
|
|
122
|
-
<Stack.Screen
|
|
123
|
-
name="ReviewDriver"
|
|
124
|
-
component={ReviewDriver}
|
|
125
|
-
options={{ headerShown: false }}
|
|
126
|
-
/>
|
|
127
|
-
<Stack.Screen
|
|
128
|
-
name='MomentOption'
|
|
129
|
-
component={MomentOption}
|
|
130
|
-
options={{ headerShown: false }}
|
|
131
|
-
/>
|
|
132
|
-
<Stack.Screen
|
|
133
|
-
name="AddressList"
|
|
134
|
-
component={AddressList}
|
|
135
|
-
options={{ headerShown: false }}
|
|
136
|
-
initialParams={{ afterSignup: false }}
|
|
137
|
-
/>
|
|
138
|
-
<Stack.Screen
|
|
139
|
-
name="AddressForm"
|
|
140
|
-
component={AddressForm}
|
|
141
|
-
options={{ headerShown: false }}
|
|
142
|
-
initialParams={{ afterSignup: false }}
|
|
143
|
-
/>
|
|
144
|
-
<Stack.Screen
|
|
145
|
-
name="Account"
|
|
146
|
-
component={Account}
|
|
147
|
-
options={{ headerShown: false }}
|
|
148
|
-
/>
|
|
149
|
-
<Stack.Screen
|
|
150
|
-
name="Help"
|
|
151
|
-
component={Help}
|
|
152
|
-
options={{ headerShown: false }}
|
|
153
|
-
/>
|
|
154
|
-
<Stack.Screen
|
|
155
|
-
name="HelpOrder"
|
|
156
|
-
component={HelpOrder}
|
|
157
|
-
options={{ headerShown: false }}
|
|
158
|
-
/>
|
|
159
|
-
<Stack.Screen
|
|
160
|
-
name="HelpGuide"
|
|
161
|
-
component={HelpGuide}
|
|
162
|
-
options={{ headerShown: false }}
|
|
163
|
-
/>
|
|
164
|
-
<Stack.Screen
|
|
165
|
-
name="HelpAccountAndPayment"
|
|
166
|
-
component={HelpAccountAndPayment}
|
|
167
|
-
options={{ headerShown: false }}
|
|
168
|
-
/>
|
|
169
|
-
<Stack.Screen
|
|
170
|
-
name="Sessions"
|
|
171
|
-
component={Sessions}
|
|
172
|
-
options={{ headerShown: false }}
|
|
173
|
-
/>
|
|
174
|
-
<Stack.Screen
|
|
175
|
-
name="MultiOrdersDetails"
|
|
176
|
-
component={MultiOrdersDetails}
|
|
177
|
-
options={{ headerShown: false }}
|
|
178
|
-
/>
|
|
179
|
-
</>
|
|
180
|
-
)}
|
|
181
|
-
</>
|
|
182
|
-
)
|
|
183
|
-
: (
|
|
184
|
-
<Stack.Screen
|
|
185
|
-
name='root'
|
|
186
|
-
component={RootNavigator}
|
|
187
|
-
options={{ headerShown: false }}
|
|
188
|
-
/>
|
|
189
|
-
)}
|
|
190
|
-
</>
|
|
191
|
-
) : (
|
|
192
|
-
<Stack.Screen
|
|
193
|
-
name="Splash"
|
|
194
|
-
component={Splash}
|
|
195
|
-
options={{ headerShown: false }}
|
|
196
|
-
/>
|
|
197
|
-
)}
|
|
198
|
-
</Stack.Navigator>
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export default HomeNavigator;
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { Platform } from 'react-native'
|
|
3
|
-
import { createStackNavigator } from '@react-navigation/stack';
|
|
4
|
-
import { useOrder, useSession, useConfig } from 'ordering-components/native';
|
|
5
|
-
import dayjs from 'dayjs'
|
|
6
|
-
import utc from 'dayjs/plugin/utc'
|
|
7
|
-
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
|
|
8
|
-
import OneSignal from 'react-native-onesignal';
|
|
9
|
-
import NetInfo from '@react-native-community/netinfo'
|
|
10
|
-
|
|
11
|
-
dayjs.extend(isSameOrAfter)
|
|
12
|
-
dayjs.extend(utc)
|
|
13
|
-
|
|
14
|
-
import Login from '../pages/Login';
|
|
15
|
-
import Signup from '../pages/Signup';
|
|
16
|
-
import Forgot from '../pages/ForgotPassword';
|
|
17
|
-
import Home from '../pages/Home';
|
|
18
|
-
import IntroductoryTutorial from '../pages/IntroductoryTutorial';
|
|
19
|
-
import AddressForm from '../pages/AddressForm';
|
|
20
|
-
import MomentOption from '../pages/MomentOption';
|
|
21
|
-
import Splash from '../pages/Splash';
|
|
22
|
-
import BusinessList from '../pages/BusinessesListing';
|
|
23
|
-
import BusinessProductsList from '../pages/BusinessProductsList';
|
|
24
|
-
import NotFound from '../pages/NotFound'
|
|
25
|
-
import HomeNavigator from './HomeNavigator';
|
|
26
|
-
import settings from '../config.json';
|
|
27
|
-
import NetworkError from '../pages/NetworkError';
|
|
28
|
-
|
|
29
|
-
import * as RootNavigation from '../navigators/NavigationRef';
|
|
30
|
-
import { _retrieveStoreData, _setStoreData } from '../providers/StoreUtil';
|
|
31
|
-
|
|
32
|
-
const Stack = createStackNavigator();
|
|
33
|
-
const RootNavigator = () => {
|
|
34
|
-
const [orderId, setOrderId] = useState(null)
|
|
35
|
-
const [{ auth, loading: sessionLoading }] = useSession();
|
|
36
|
-
const [orderStatus, { changeMoment }] = useOrder();
|
|
37
|
-
const [{ configs, loading: configsLoading }] = useConfig();
|
|
38
|
-
const [loaded, setLoaded] = useState(false);
|
|
39
|
-
const [productLogin, setProductLogin] = useState({})
|
|
40
|
-
const [oneSignalState, setOneSignalState] = useState<any>({
|
|
41
|
-
notification_app: settings.notification_app
|
|
42
|
-
});
|
|
43
|
-
const [ isTutorial, setTutorial] = useState(true)
|
|
44
|
-
const [isPushLoading, setIsPushLoading] = useState({ loading: true })
|
|
45
|
-
const [connectionState, setConnectionState] = useState<{
|
|
46
|
-
connection_status: boolean;
|
|
47
|
-
} | null>(null);
|
|
48
|
-
|
|
49
|
-
const validDate = (date : any) => {
|
|
50
|
-
if (!date) return
|
|
51
|
-
const _date = dayjs(date, 'YYYY-MM-DD HH:mm').isSameOrAfter(dayjs(), 'day')
|
|
52
|
-
? dayjs(date).format('YYYY-MM-DD HH:mm')
|
|
53
|
-
: dayjs().format('YYYY-MM-DD HH:mm')
|
|
54
|
-
return _date
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const oneSignalSetup = async () => {
|
|
58
|
-
setIsPushLoading({ loading: true });
|
|
59
|
-
OneSignal.setLogLevel(6, 0);
|
|
60
|
-
|
|
61
|
-
OneSignal.setAppId(configs?.onesignal_orderingapp_id?.value);
|
|
62
|
-
|
|
63
|
-
if (Platform.OS === 'ios') {
|
|
64
|
-
OneSignal.promptForPushNotificationsWithUserResponse((response : any) => {
|
|
65
|
-
console.log('Prompt response:', response);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
OneSignal.setNotificationOpenedHandler(({ notification }: any) => {
|
|
70
|
-
if(notification?.additionalData?.order_uuid) {
|
|
71
|
-
setOrderId(notification?.additionalData?.order_uuid)
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
OneSignal.addSubscriptionObserver((event: any) => {
|
|
76
|
-
setOneSignalState({ ...oneSignalState, notification_token: event?.to?.userId });
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
const deviceState: any = await OneSignal.getDeviceState();
|
|
80
|
-
|
|
81
|
-
if (!deviceState?.isSubscribed) {
|
|
82
|
-
OneSignal.addTrigger("prompt_ios", "true");
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
OneSignal.disablePush(false);
|
|
86
|
-
|
|
87
|
-
const data = {
|
|
88
|
-
...oneSignalState,
|
|
89
|
-
notification_token: deviceState?.userId,
|
|
90
|
-
notification_app: settings.notification_app
|
|
91
|
-
}
|
|
92
|
-
setOneSignalState(data);
|
|
93
|
-
setIsPushLoading({ loading: false });
|
|
94
|
-
};
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
if (!loaded && !orderStatus.loading && !isPushLoading.loading) {
|
|
97
|
-
setLoaded(true)
|
|
98
|
-
}
|
|
99
|
-
}, [orderStatus, isPushLoading])
|
|
100
|
-
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
if (orderId && loaded && auth) {
|
|
103
|
-
RootNavigation.navigate('OrderDetails', {
|
|
104
|
-
orderId: orderId,
|
|
105
|
-
isFromRoot: true
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
setOrderId(null)
|
|
109
|
-
}
|
|
110
|
-
}, [loaded, orderId])
|
|
111
|
-
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
const setTutorialLocal = async () => {
|
|
114
|
-
const data = await _retrieveStoreData('isTutorial');
|
|
115
|
-
if(data === false){
|
|
116
|
-
setTutorial(false)
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
setTutorialLocal();
|
|
120
|
-
}, [isTutorial])
|
|
121
|
-
|
|
122
|
-
useEffect(() => {
|
|
123
|
-
if (!sessionLoading && !isPushLoading.loading && !auth) {
|
|
124
|
-
setLoaded(!auth)
|
|
125
|
-
}
|
|
126
|
-
}, [sessionLoading, isPushLoading])
|
|
127
|
-
|
|
128
|
-
useEffect(() => {
|
|
129
|
-
const _currentDate = dayjs.utc(validDate(orderStatus.options?.moment)).local()
|
|
130
|
-
if (!_currentDate) {
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
const selected = dayjs(_currentDate, 'YYYY-MM-DD HH:mm')
|
|
134
|
-
const now = dayjs()
|
|
135
|
-
const secondsDiff = selected.diff(now, 'seconds')
|
|
136
|
-
const checkTime = setTimeout(() => {
|
|
137
|
-
changeMoment(null)
|
|
138
|
-
}, secondsDiff * 1000)
|
|
139
|
-
|
|
140
|
-
return () => {
|
|
141
|
-
clearTimeout(checkTime)
|
|
142
|
-
}
|
|
143
|
-
}, [orderStatus.options?.moment])
|
|
144
|
-
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
if (configsLoading) return
|
|
147
|
-
if (configs?.onesignal_orderingapp_id?.value) {
|
|
148
|
-
oneSignalSetup();
|
|
149
|
-
}
|
|
150
|
-
if (!!!configs?.onesignal_orderingapp_id?.value) {
|
|
151
|
-
setIsPushLoading({ loading: false });
|
|
152
|
-
}
|
|
153
|
-
}, [configsLoading]);
|
|
154
|
-
|
|
155
|
-
let netInfoSuscription : any = null
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
netInfoSuscription = NetInfo.addEventListener(handleConnectivityChange);
|
|
158
|
-
|
|
159
|
-
return () => {
|
|
160
|
-
netInfoSuscription && netInfoSuscription()
|
|
161
|
-
}
|
|
162
|
-
}, []);
|
|
163
|
-
|
|
164
|
-
const handleConnectivityChange = (state : any) => {
|
|
165
|
-
setConnectionState({ connection_status: state.isConnected });
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
<Stack.Navigator>
|
|
170
|
-
{
|
|
171
|
-
!loaded && (
|
|
172
|
-
<Stack.Screen
|
|
173
|
-
name="Splash"
|
|
174
|
-
component={Splash}
|
|
175
|
-
options={{ headerShown: false }}
|
|
176
|
-
/>
|
|
177
|
-
)
|
|
178
|
-
}
|
|
179
|
-
{
|
|
180
|
-
loaded && connectionState?.connection_status && (
|
|
181
|
-
<>
|
|
182
|
-
{!auth ? (
|
|
183
|
-
<>
|
|
184
|
-
{ isTutorial ? (
|
|
185
|
-
<Stack.Screen
|
|
186
|
-
name="IntroductoryTutorial"
|
|
187
|
-
component={IntroductoryTutorial}
|
|
188
|
-
options={{ headerShown: false }}
|
|
189
|
-
initialParams={{ setTutorial }}
|
|
190
|
-
/>):(
|
|
191
|
-
<Stack.Screen
|
|
192
|
-
name="Home"
|
|
193
|
-
component={Home}
|
|
194
|
-
options={{ headerShown: false }}
|
|
195
|
-
/>)}
|
|
196
|
-
<Stack.Screen
|
|
197
|
-
name="Login"
|
|
198
|
-
component={Login}
|
|
199
|
-
options={{ headerShown: false }}
|
|
200
|
-
listeners={{
|
|
201
|
-
state: (e: any) => {
|
|
202
|
-
setProductLogin(e.data.state.routes.find((object: any) => object?.params?.product)?.params?.product)
|
|
203
|
-
}
|
|
204
|
-
}}
|
|
205
|
-
initialParams={{ notification_state: oneSignalState }}
|
|
206
|
-
/>
|
|
207
|
-
<Stack.Screen
|
|
208
|
-
name="Signup"
|
|
209
|
-
component={Signup}
|
|
210
|
-
options={{ headerShown: false }}
|
|
211
|
-
initialParams={{ notification_state: oneSignalState }}
|
|
212
|
-
/>
|
|
213
|
-
<Stack.Screen
|
|
214
|
-
name="Forgot"
|
|
215
|
-
component={Forgot}
|
|
216
|
-
options={{ headerShown: false }}
|
|
217
|
-
/>
|
|
218
|
-
<Stack.Screen
|
|
219
|
-
name="AddressForm"
|
|
220
|
-
component={AddressForm}
|
|
221
|
-
options={{ headerShown: false }}
|
|
222
|
-
/>
|
|
223
|
-
<Stack.Screen
|
|
224
|
-
name='BusinessList'
|
|
225
|
-
component={BusinessList}
|
|
226
|
-
options={{ headerShown: false }}
|
|
227
|
-
/>
|
|
228
|
-
<Stack.Screen
|
|
229
|
-
name='Business'
|
|
230
|
-
component={BusinessProductsList}
|
|
231
|
-
options={{ headerShown: false }}
|
|
232
|
-
initialParams={{ setProductLogin }}
|
|
233
|
-
/>
|
|
234
|
-
<Stack.Screen
|
|
235
|
-
name='MomentOption'
|
|
236
|
-
component={MomentOption}
|
|
237
|
-
options={{ headerShown: false }}
|
|
238
|
-
/>
|
|
239
|
-
</>
|
|
240
|
-
) : (
|
|
241
|
-
<>
|
|
242
|
-
<Stack.Screen
|
|
243
|
-
name='MyAccount'
|
|
244
|
-
component={HomeNavigator}
|
|
245
|
-
options={{ headerShown: false }}
|
|
246
|
-
initialParams={{ productLogin }}
|
|
247
|
-
/>
|
|
248
|
-
</>
|
|
249
|
-
)}
|
|
250
|
-
</>
|
|
251
|
-
)
|
|
252
|
-
}
|
|
253
|
-
{connectionState?.connection_status === false ? (
|
|
254
|
-
<Stack.Screen
|
|
255
|
-
name='NetworkError'
|
|
256
|
-
component={NetworkError}
|
|
257
|
-
options={{ headerShown: false }}
|
|
258
|
-
/>
|
|
259
|
-
) : (
|
|
260
|
-
<Stack.Screen
|
|
261
|
-
name='NotFound'
|
|
262
|
-
component={NotFound}
|
|
263
|
-
options={{ headerShown: false }}
|
|
264
|
-
/>
|
|
265
|
-
)}
|
|
266
|
-
</Stack.Navigator>
|
|
267
|
-
);
|
|
268
|
-
};
|
|
269
|
-
export default RootNavigator;
|
package/src/pages/Account.tsx
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import styled from 'styled-components/native';
|
|
3
|
-
import { Platform } from 'react-native';
|
|
4
|
-
import { Container } from '../layouts/Container'
|
|
5
|
-
import { Account as AccountController } from '../components/Account'
|
|
6
|
-
|
|
7
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
8
|
-
flex-grow: 1;
|
|
9
|
-
`;
|
|
10
|
-
interface Props {
|
|
11
|
-
navigation: any;
|
|
12
|
-
route: any;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const Account = (props: Props) => {
|
|
16
|
-
const accountProps = {
|
|
17
|
-
...props,
|
|
18
|
-
useSessionUser: true,
|
|
19
|
-
useValidationFields: true
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<KeyboardView
|
|
24
|
-
enabled
|
|
25
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
26
|
-
>
|
|
27
|
-
<Container>
|
|
28
|
-
<AccountController {...accountProps} />
|
|
29
|
-
</Container>
|
|
30
|
-
</KeyboardView>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default Account
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import styled from 'styled-components/native'
|
|
3
|
-
import { Platform } from 'react-native';
|
|
4
|
-
import { AddressForm as AddressFormController } from '../components/AddressForm'
|
|
5
|
-
import { SafeAreaContainer } from '../layouts/SafeAreaContainer'
|
|
6
|
-
import { _retrieveStoreData } from '../providers/StoreUtil';
|
|
7
|
-
|
|
8
|
-
const KeyboardView = styled.KeyboardAvoidingView`
|
|
9
|
-
flex-grow: 1;
|
|
10
|
-
flex-shrink: 1;
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
const AddressForm = ({ navigation, route }: any) => {
|
|
14
|
-
const AddressFormProps = {
|
|
15
|
-
navigation,
|
|
16
|
-
route,
|
|
17
|
-
address: route?.params?.address,
|
|
18
|
-
addressId: route?.params?.address?.id,
|
|
19
|
-
isEditing: route?.params?.isEditing,
|
|
20
|
-
addressesList: route?.params?.addressList,
|
|
21
|
-
onSaveAddress: route?.params?.onSaveAddress,
|
|
22
|
-
isSelectedAfterAdd: true,
|
|
23
|
-
isGuestUser: route?.params?.isGuestUser,
|
|
24
|
-
isFromBusinesses: route?.params?.isFromBusinesses,
|
|
25
|
-
isFromProductsList: route?.params?.isFromProductsList,
|
|
26
|
-
isFromCheckout: route?.params?.isFromCheckout,
|
|
27
|
-
hasAddressDefault: route?.params?.hasAddressDefault,
|
|
28
|
-
afterSignup: route?.params?.afterSignup,
|
|
29
|
-
businessId: route.params?.businessId,
|
|
30
|
-
categoryId: route.params?.categoryId,
|
|
31
|
-
productId: route.params?.productId,
|
|
32
|
-
store: route.params?.store
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const [isGuestFromStore, setIsGuestFromStore] = useState(false)
|
|
36
|
-
|
|
37
|
-
const getDataFromStorage = async () => {
|
|
38
|
-
const value = await _retrieveStoreData('isGuestUser');
|
|
39
|
-
setIsGuestFromStore(value);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
getDataFromStorage()
|
|
44
|
-
}, [])
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<SafeAreaContainer>
|
|
48
|
-
<KeyboardView
|
|
49
|
-
enabled
|
|
50
|
-
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
51
|
-
>
|
|
52
|
-
<AddressFormController
|
|
53
|
-
{ ...AddressFormProps }
|
|
54
|
-
isGuestFromStore={isGuestFromStore}
|
|
55
|
-
useValidationFileds
|
|
56
|
-
/>
|
|
57
|
-
</KeyboardView>
|
|
58
|
-
</SafeAreaContainer>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default AddressForm
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { AddressList as AddressListController } from '../components/AddressList'
|
|
3
|
-
import { useSession } from 'ordering-components/native'
|
|
4
|
-
|
|
5
|
-
const AddressList = ({ route, navigation }: any) => {
|
|
6
|
-
const [{ user }] = useSession()
|
|
7
|
-
const addressListProps = {
|
|
8
|
-
navigation,
|
|
9
|
-
route,
|
|
10
|
-
userId: user?.id,
|
|
11
|
-
isGoBack: route?.params?.isGoBack,
|
|
12
|
-
isFromBusinesses: route?.params?.isFromBusinesses,
|
|
13
|
-
isFromProductsList: route?.params?.isFromProductsList,
|
|
14
|
-
isFromCheckout: route?.params?.isFromCheckout,
|
|
15
|
-
isFromProfile: route?.params?.isFromProfile,
|
|
16
|
-
afterSignup: route?.params?.afterSignup
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<AddressListController {...addressListProps} />
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default AddressList
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useApi } from 'ordering-components/native'
|
|
3
|
-
import { BusinessProductsListing as BusinessProductsListController } from '../components/BusinessProductsListing'
|
|
4
|
-
import styled from 'styled-components/native'
|
|
5
|
-
import { useTheme } from 'styled-components/native'
|
|
6
|
-
|
|
7
|
-
const BusinessProductsList = (props: any) => {
|
|
8
|
-
const theme = useTheme()
|
|
9
|
-
const [ordering] = useApi()
|
|
10
|
-
|
|
11
|
-
const store = props.route.params?.store || props.route.params?.productLogin?.slug
|
|
12
|
-
const header = props.route.params?.header
|
|
13
|
-
const logo = props.route.params?.logo
|
|
14
|
-
const product = props.route.params?.productLogin
|
|
15
|
-
const businessId = props.route.params?.businessId
|
|
16
|
-
const categoryId = props.route.params?.categoryId
|
|
17
|
-
const productId = props.route.params?.productId
|
|
18
|
-
|
|
19
|
-
const businessProductsProps = {
|
|
20
|
-
...props,
|
|
21
|
-
ordering,
|
|
22
|
-
isSearchByName: true,
|
|
23
|
-
isSearchByDescription: true,
|
|
24
|
-
slug: store,
|
|
25
|
-
businessProps: [
|
|
26
|
-
'id',
|
|
27
|
-
'name',
|
|
28
|
-
'header',
|
|
29
|
-
'logo',
|
|
30
|
-
'name',
|
|
31
|
-
'open',
|
|
32
|
-
'about',
|
|
33
|
-
'description',
|
|
34
|
-
'ribbon',
|
|
35
|
-
'address',
|
|
36
|
-
'location',
|
|
37
|
-
'schedule',
|
|
38
|
-
'service_fee',
|
|
39
|
-
'delivery_price',
|
|
40
|
-
'distance',
|
|
41
|
-
'delivery_time',
|
|
42
|
-
'gallery',
|
|
43
|
-
'pickup_time',
|
|
44
|
-
'reviews',
|
|
45
|
-
'featured',
|
|
46
|
-
'offers',
|
|
47
|
-
'food',
|
|
48
|
-
'laundry',
|
|
49
|
-
'alcohol',
|
|
50
|
-
'groceries',
|
|
51
|
-
'slug',
|
|
52
|
-
'products',
|
|
53
|
-
'zones',
|
|
54
|
-
'timezone'
|
|
55
|
-
],
|
|
56
|
-
handleSearchRedirect: () => {
|
|
57
|
-
props.navigation.navigate('BusinessList')
|
|
58
|
-
},
|
|
59
|
-
onProductRedirect: ({ slug, category, product }: any) => {},
|
|
60
|
-
onCheckoutRedirect: (cartUuid: any) => {},
|
|
61
|
-
logo,
|
|
62
|
-
header,
|
|
63
|
-
product,
|
|
64
|
-
productId,
|
|
65
|
-
categoryId,
|
|
66
|
-
businessId
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const BusinessProductsListView = styled.SafeAreaView`
|
|
70
|
-
flex: 1;
|
|
71
|
-
background-color: ${theme.colors.backgroundPage};
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<BusinessProductsListView>
|
|
76
|
-
<BusinessProductsListController {...businessProductsProps} />
|
|
77
|
-
</BusinessProductsListView>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export default BusinessProductsList
|