ordering-ui-react-native 0.17.82-release → 0.17.83-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
CHANGED
|
@@ -36,6 +36,9 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
36
36
|
|
|
37
37
|
const [isProfile, setIsProfile] = useState(isFromProfile || route?.params?.isFromProfile);
|
|
38
38
|
|
|
39
|
+
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
40
|
+
const onNavigationRedirect = (route: string, params?: any) => navigation.navigate(route, params)
|
|
41
|
+
|
|
39
42
|
const onNavigatorRedirect = () => {
|
|
40
43
|
if (route && (isFromBusinesses || isGoBack)) {
|
|
41
44
|
isGoBack ? goToBack() : onNavigationRedirect('BottomTab')
|
|
@@ -97,6 +100,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
97
100
|
const handleSetAddress = (address: any) => {
|
|
98
101
|
if (address.id === orderState?.options?.address_id) return
|
|
99
102
|
handleSetDefault(address)
|
|
103
|
+
onNavigatorRedirect()
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
const handleSaveAddress = (address: any) => {
|
|
@@ -125,15 +129,6 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
131
|
|
|
128
|
-
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
129
|
-
const onNavigationRedirect = (route: string, params?: any) => navigation.navigate(route, params)
|
|
130
|
-
|
|
131
|
-
useEffect(() => {
|
|
132
|
-
if (orderState.loading && auth && orderState.options.address?.location) {
|
|
133
|
-
onNavigatorRedirect()
|
|
134
|
-
}
|
|
135
|
-
}, [orderState.options.address])
|
|
136
|
-
|
|
137
132
|
useEffect(() => {
|
|
138
133
|
console.log('From profile : ' + isProfile)
|
|
139
134
|
}, [])
|