diff --git a/app.json b/app.json index c845742..811bf95 100644 --- a/app.json +++ b/app.json @@ -15,9 +15,7 @@ "updates": { "fallbackToCacheTimeout": 0 }, - "assetBundlePatterns": [ - "**/*" - ], + "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true, "bundleIdentifier": "com.appsazz.RnDanovinExpo" @@ -32,6 +30,14 @@ "web": { "favicon": "" }, - "description": "" + "description": "", + "plugins": [ + [ + "expo-image-picker", + { + "photosPermission": "photosPermission" + } + ] + ] } } diff --git a/src/assets/images/poster.png b/src/assets/images/poster.png new file mode 100644 index 0000000..c5cd37d Binary files /dev/null and b/src/assets/images/poster.png differ diff --git a/src/redux/proxy.js b/src/redux/proxy.js index 57dc4e6..d9e80b6 100644 --- a/src/redux/proxy.js +++ b/src/redux/proxy.js @@ -57,9 +57,14 @@ class Proxy { check = async (url, { dispatch }, fetch, params) => { try { + console.log(url.split("/")[0] === 'file'); dispatch = dispatch || (() => {}); dispatch({ type: url.split("/")[0] + "/" + "loading" }); let response = await fetch(); + if(url.split("/")[0] === 'file'){ + console.log('response'); + console.log(response); + } // console.log(response); switch (response.status) { case 200: @@ -84,7 +89,7 @@ class Proxy { }); } return false; - } catch (error) {} + } catch (error) {console.log(error)} }; refresh = () => { diff --git a/src/screens/Address/index.js b/src/screens/Address/index.js index 6e2e7e2..507a70d 100644 --- a/src/screens/Address/index.js +++ b/src/screens/Address/index.js @@ -152,18 +152,18 @@ const Address = ({ id, } = addressFields; - if (!firstName) { - return asyncAwesomeAlert("خطا", "نام خود را وارد کنید.", { - showCancelButton: false, - confirmText: "باشه", - }); - } - if (!lastName) { - return asyncAwesomeAlert("خطا", "نام خانوادگی خود را وارد کنید", { - showCancelButton: false, - confirmText: "باشه", - }); - } + // if (!firstName) { + // return asyncAwesomeAlert("خطا", "نام خود را وارد کنید.", { + // showCancelButton: false, + // confirmText: "باشه", + // }); + // } + // if (!lastName) { + // return asyncAwesomeAlert("خطا", "نام خانوادگی خود را وارد کنید", { + // showCancelButton: false, + // confirmText: "باشه", + // }); + // } if (!cellphone) { return asyncAwesomeAlert("خطا", "شماره موبایل خود را وارد کنید.", { showCancelButton: false, @@ -192,23 +192,23 @@ const Address = ({ } } - if (!phone) { - return asyncAwesomeAlert("خطا", "شماره تلفن خود را وارد کنید.", { - showCancelButton: false, - confirmText: "باشه", - }); - } else { - if (phone.slice(0, 1) !== "0") { - return asyncAwesomeAlert( - "خطا", - "فرمت شماره تلفن وارد شده اشتباه است.", - { - showCancelButton: false, - confirmText: "باشه", - } - ); - } - } + // if (!phone) { + // return asyncAwesomeAlert("خطا", "شماره تلفن خود را وارد کنید.", { + // showCancelButton: false, + // confirmText: "باشه", + // }); + // } else { + // if (phone.slice(0, 1) !== "0") { + // return asyncAwesomeAlert( + // "خطا", + // "فرمت شماره تلفن وارد شده اشتباه است.", + // { + // showCancelButton: false, + // confirmText: "باشه", + // } + // ); + // } + // } if (!provinceId) { return asyncAwesomeAlert("خطا", "نام استان خود را وارد کنید.", { @@ -229,7 +229,7 @@ const Address = ({ }); } else { if (postalCode.length !== 10) { - return asyncAwesomeAlert("خطا", "کد ملی میبایست ده رقم باشد.", { + return asyncAwesomeAlert("خطا", "کد پستی میبایست ده رقم باشد.", { showCancelButton: false, confirmText: "باشه", }); diff --git a/src/screens/Product/components/Book.js b/src/screens/Product/components/Book.js index dae41a6..8df929b 100644 --- a/src/screens/Product/components/Book.js +++ b/src/screens/Product/components/Book.js @@ -92,7 +92,7 @@ function Book({ const addToCart = React.useCallback( async (action, type) => { setWhichTypeAdded(type); - await action(); + action(); }, [book, userId] ); diff --git a/src/screens/Profile/components/User.js b/src/screens/Profile/components/User.js index 1be0811..b1ae28f 100644 --- a/src/screens/Profile/components/User.js +++ b/src/screens/Profile/components/User.js @@ -20,6 +20,7 @@ const { width } = Dimensions.get("window"); const User = ({ user, mobile, theme, upload }) => { const [dropdown, setDropdown] = React.useState(true); const [image, setImage] = React.useState(null); + const [status, requestPermission] = ImagePicker.useMediaLibraryPermissions(); const navigation = useNavigation(); const pickImage = React.useCallback(async () => { diff --git a/src/screens/ShoppingCart/index.js b/src/screens/ShoppingCart/index.js index bec6546..aa10a44 100644 --- a/src/screens/ShoppingCart/index.js +++ b/src/screens/ShoppingCart/index.js @@ -221,8 +221,9 @@ function ShoppingCart({ }, ]} > - {isEmpty ? 0 : separate(factorInfo?.payPrice - factorInfo?.transportPrice)} + {isEmpty ? 0 : separate(factorInfo?.payPrice)} +