ordering-ui-react-native 0.15.87-release → 0.15.88-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
|
@@ -805,16 +805,23 @@ export const Checkout = (props: any) => {
|
|
|
805
805
|
|
|
806
806
|
const getOrder = async (cartId: any) => {
|
|
807
807
|
try {
|
|
808
|
-
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
808
|
+
let result: any = {}
|
|
809
|
+
const cart = orderState?.carts.find((cart: any) => cart.uuid === cartId)
|
|
810
|
+
if (cart) {
|
|
811
|
+
result = { ...cart }
|
|
812
|
+
} else {
|
|
813
|
+
setCartState({ ...cartState, loading: true })
|
|
814
|
+
const url = `${ordering.root}/carts/${cartId}`
|
|
815
|
+
const response = await fetch(url, {
|
|
816
|
+
method: 'GET',
|
|
817
|
+
headers: {
|
|
818
|
+
'Content-Type': 'application/json',
|
|
819
|
+
Authorization: `Bearer ${token}`
|
|
820
|
+
}
|
|
821
|
+
})
|
|
822
|
+
const content = await response.json();
|
|
823
|
+
result = content.result
|
|
824
|
+
}
|
|
818
825
|
|
|
819
826
|
let publicKey = null
|
|
820
827
|
try {
|
|
@@ -610,7 +610,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
610
610
|
}
|
|
611
611
|
})}
|
|
612
612
|
forwardRef={phoneRef}
|
|
613
|
-
defaultCode={formState?.country_code ?? formState?.country_phone_code ?? null}
|
|
614
613
|
changeCountry={(val: any) => setPhoneInputData({
|
|
615
614
|
...phoneInputData,
|
|
616
615
|
phone: {
|