reza added some change

master
Reza_ashrafi 3 years ago
parent 7b16deabe0
commit 9400f85860
  1. 2
      navigation/index.js
  2. 117
      src/components/BottomSheetComponents/ProductQuestion.js
  3. 44
      src/components/Empty.js
  4. 2
      src/components/Navbar.js
  5. 7
      src/redux/reducers/userFavorite.js
  6. 7
      src/screens/Home/components/Blogs.js
  7. 110
      src/screens/Home/components/MyBooks.js
  8. 6
      src/screens/Home/components/Scroll.js
  9. 14
      src/screens/Home/components/Videos.js
  10. 6
      src/screens/Product/components/Book.js
  11. 47
      src/screens/Profile/components/ProfileAddress/index.js
  12. 57
      src/screens/Profile/components/ProfileBookmark/index.js
  13. 3
      src/screens/Profile/components/User.js
  14. 227
      src/screens/ShoppingCart/index.js
  15. 2
      src/screens/VideoDisplay/index.js

@ -67,7 +67,7 @@ const BottomTabNavigator = ({}) => {
tabBarActiveTintColor: Colors.theme1[colorScheme].green79,
tabBarInactiveTintColor: "grey",
tabBarStyle: {
backgroundColor: Colors.theme1[colorScheme].greenFF1,
backgroundColor: Colors.theme1[colorScheme].white,
},
tabBarLabelStyle: {
// fontSize: fontSize.sm,

@ -15,65 +15,10 @@ import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
import Colors from "../../constants/Colors";
const { width } = Dimensions.get("window");
const ios = Platform.OS === "ios";
const ProductQuestion = ({ list, mobile }) => {
const colorScheme = Appearance.getColorScheme();
const Question = ({ question }) => {
return (
<View style={[tw("flex mb-3")]}>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
fontSize: mobile ? fontSize.tiny : fontSize.xl3,
textAlign: ios ? "right" : "auto",
}}
>
سوال
</Text>
<Text
style={{
fontFamily: "bold",
color: "#323232",
fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto",
}}
>
{question.question}
</Text>
{question.answer && (
<>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.tiny,
marginTop: 10,
textAlign: ios ? "right" : "auto",
}}
>
پاسخ
</Text>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].gray2077,
fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto",
marginTop: mobile ? "" : 10,
}}
>
{question.question}
</Text>
</>
)}
{/* <View></View> */}
<Divider type="vertical" />
</View>
);
};
return (
<View style={{ flex: 1, paddingHorizontal: 16 }}>
<View
@ -102,14 +47,70 @@ const ProductQuestion = ({ list, mobile }) => {
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{list.map((question, index) => (
<Question question={question} key={index} />
))}
{/* {list?.map((question, index) => (
<Question question={question} key={index} mobile={mobile} />
))} */}
</ScrollView>
</View>
);
};
const Question = ({ question, mobile }) => {
const colorScheme = Appearance.getColorScheme();
return (
<View style={[tw("flex mb-3")]}>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
fontSize: mobile ? fontSize.tiny : fontSize.xl3,
textAlign: ios ? "right" : "auto",
}}
>
سوال
</Text>
<Text
style={{
fontFamily: "bold",
color: "#323232",
fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto",
}}
>
{question?.question}
</Text>
{question?.answer && (
<>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.tiny,
marginTop: 10,
textAlign: ios ? "right" : "auto",
}}
>
پاسخ
</Text>
<Text
style={{
fontFamily: "bold",
color: Colors.theme1[colorScheme].gray2077,
fontSize: mobile ? fontSize.sm : fontSize.base,
textAlign: ios ? "right" : "auto",
marginTop: mobile ? "" : 10,
}}
>
{question?.answer}
</Text>
</>
)}
{/* <View></View> */}
<Divider type="vertical" />
</View>
);
};
const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile,
});

@ -0,0 +1,44 @@
import { View, Text, Pressable, Appearance } from "react-native";
import React from "react";
//style
import Colors from "../constants/Colors";
import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
const Empty = ({ text, buttonText, buttonAction }) => {
const colorScheme = Appearance.getColorScheme();
return (
<View style={tw("flex-1 flex justify-center items-center")}>
<Text
style={[
tw("text-gray-500"),
{
fontFamily: "regular",
fontSize: fontSize.tiny,
transform: [{ translateY: -50 }],
},
]}
>
{text + " " + ":("}
</Text>
{buttonText && (
<Pressable style={[tw('py-2 px-5 rounded-sm'),{ backgroundColor: Colors.theme1[colorScheme].greenCF }]} onPress={() => buttonAction()}>
<Text
style={[
tw("text-white"),
{
fontFamily: "regular",
fontSize: fontSize.tiny,
},
]}
>
{buttonText}
</Text>
</Pressable>
)}
</View>
);
};
export default Empty;

@ -80,7 +80,7 @@ const Navbar = ({
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.xl,
fontSize: fontSize.lg,
color: Color.theme1[colorScheme].green79,
paddingRight: 16,
}}

@ -1,3 +1,6 @@
import { toastMessage} from '../../utils/message';
import { asyncAwesomeAlert } from '../../utils/AsyncWrappers';
const initialState = {
loading: false,
error: null,
@ -16,12 +19,16 @@ export default function userAddress(state = initialState, action) {
case "userAddress/update":
return { ...state, loading: false, error: null };
case "userAddress/add":
toastMessage('به لیست علاقهمندیها اضافه شد.');
return { ...state, loading: false, error: null };
case "userAddress/delete":
return { ...state, loading: false, error: null };
case "userAddress/loading":
return { ...state, loading: true };
case "userAddress/error":
asyncAwesomeAlert("خطا", data.message, {
showCancelButton: false,
});
return { ...state, loading: false, error: data.message };
default:
return state;

@ -29,8 +29,8 @@ const ios = Platform.OS === "ios";
function Blogs({ blogs, mobile }) {
return (
<View style={[tw("flex pr-3 mb-5")]}>
<View style={tw("w-full pl-3")}>
<View style={[tw("flex mb-5")]}>
<View style={tw("w-full px-4")}>
<Header title={"خواندنیها"} route={"Blogs"} />
</View>
<FlatList
@ -54,7 +54,7 @@ const Blog = ({ blog, mobile }) => {
return (
<Pressable
style={[
tw("rounded-md ml-3 rounded-md relative"),
tw("rounded-md mr-4 rounded-md relative"),
{ width: mobile ? 250 : width / 2.2 },
]}
onPress={() => navigation.push("Blog", { id: blog?.id })}
@ -106,7 +106,6 @@ const Blog = ({ blog, mobile }) => {
style={[tw("rounded-full ml-1"), { width: 20, flex: 1 }]}
/>
</View>
<Text
style={[
{

@ -22,62 +22,11 @@ const ios = Platform.OS === "ios";
function MyBooks({ books, grades }) {
const colorScheme = Appearance.getColorScheme();
const Book = ({ book }) => {
const navigation = useNavigation();
return (
<Pressable
style={tw(`flex ml-3 ${ios ? "items-end" : ""}`)}
onPress={() => {}}
>
<View style={{ height: 165 }}>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${book.product.book.fileIds}`,
}}
resizeMode="contain"
style={[
{
width: 110,
flex: 1,
},
]}
/>
</View>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
fontSize: fontSize.sm,
},
]}
>
{book.product.book.name}
</Text>
<Text
style={[
tw("pr-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "light",
fontSize: fontSize.sm,
},
]}
>
{"پایه" + " " + grades[book.product.book.gradeId]}
</Text>
<Progress percent={60} alignItems={"items-end"} />
</Pressable>
);
};
return (
<View style={[tw("flex w-full px-4 mb-5")]}>
<View style={[tw("flex w-full mb-5")]}>
<View
style={[
tw(`w-full flex rounded-md pt-3 px-2 overflow-hidden`),
tw(`w-full flex rounded-md pt-3 overflow-hidden`),
{
backgroundColor: Colors.theme1[colorScheme].greenCF + "0F",
borderColor: Colors.theme1[colorScheme].greenD9 + "",
@ -87,7 +36,7 @@ function MyBooks({ books, grades }) {
>
<Text
style={[
tw(`${ios ? "text-right" : ""} w-full`),
tw(`pr-4 ${ios ? "text-right" : ""} w-full`),
{
color: Colors.theme1[colorScheme].green79,
fontFamily: "demi",
@ -103,7 +52,7 @@ function MyBooks({ books, grades }) {
horizontal={true}
inverted={true}
data={books}
renderItem={({ item }) => <Book book={item} />}
renderItem={({ item }) => <Book book={item} grades={grades} />}
keyExtractor={(book) => book?.id}
/>
</View>
@ -111,6 +60,57 @@ function MyBooks({ books, grades }) {
);
}
const Book = ({ book, grades }) => {
const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
return (
<Pressable
style={tw(`flex mr-4 ${ios ? "items-end" : ""}`)}
onPress={() => {}}
>
<View style={{ height: 165 }}>
<Image
source={{
uri: `https://dnvn.ir/api/v1/file/${book.product.book.fileIds}`,
}}
resizeMode="contain"
style={[
{
width: 110,
flex: 1,
},
]}
/>
</View>
<Text
style={[
tw("mt-2 pr-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "bold",
fontSize: fontSize.sm,
},
]}
>
{book.product.book.name}
</Text>
<Text
style={[
tw("pr-1"),
{
color: Colors.theme1[colorScheme].gray20,
fontFamily: "light",
fontSize: fontSize.sm,
},
]}
>
{"پایه" + " " + grades[book.product.book.gradeId]}
</Text>
<Progress percent={60} alignItems={"items-end"} />
</Pressable>
);
};
const mapStateToProps = (state) => ({
grades: state.publicApi.grades,
});

@ -25,10 +25,11 @@ function Scroll({ books, mobile }) {
navigation.navigate("Product", { id: book?.id, type: "book" })
}
style={[
tw("mx-1 overflow-hidden"),
tw("mr-1 overflow-hidden"),
{
width: position === 0 ? mobile ? 163 : 240 : mobile ? 84 : 125,
height: position === 0 ? mobile ? 245 : 350 : mobile ? 118 : 170,
marginLeft : position === 0 ? 16 : 4,
},
]}
>
@ -58,7 +59,7 @@ function Scroll({ books, mobile }) {
);
};
return (
<View style={[tw(`flex pr-3 mb-5`)]}>
<View style={[tw(`flex mb-5`)]}>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
@ -67,7 +68,6 @@ function Scroll({ books, mobile }) {
data={[{ id: 0 }]}
renderItem={({}) => <Box books={books} />}
keyExtractor={(item) => item.id}
/>
</View>
);

@ -23,13 +23,11 @@ const ios = Platform.OS === "ios";
function Videos({ videos, grades, mobile }) {
return (
<View style={[tw("w-full px-2 mb-5")]}>
<View
style={[
tw("w-full flex rounded-md pt-2 px-2 overflow-hidden"),
]}
>
<Header title="دورههای ویدئویی شما" route={"VOD"} />
<View style={[tw("w-full mb-5")]}>
<View style={[tw("w-full flex rounded-md pt-2 overflow-hidden")]}>
<View style={tw('flex px-4')}>
<Header title="دورههای ویدئویی شما" route={"VOD"} />
</View>
<FlatList
showsHorizontalScrollIndicator={false}
style={[tw("py-3")]}
@ -52,7 +50,7 @@ const Video = ({ video, mobile, grades }) => {
return (
<Pressable
style={[
tw(`flex relative ${mobile ? "ml-3" : "ml-5"}`),
tw(`flex relative ${mobile ? "mr-4" : "ml-5"}`),
{ width: mobile ? 130 : 200, height: mobile ? 280 : 280 },
]}
onPress={() => navigation.navigate("Video", { id: video.id })}

@ -594,19 +594,19 @@ function Book({
component={
<ProductSpecifications list={book?.product[type]?.properties} />
}
height={height - height / 4}
height={height / 2}
/>
<LinkBox
title="نقد بررسی و توضیحات تکمیلی محصول"
key={"1"}
component={<ProductReview />}
height={height - height / 4}
height={height / 2}
/>
<LinkBox
title="پرسش و پاسخ"
key={"2"}
component={<ProductQuestion />}
height={height - height / 4}
height={height / 2}
/>
{product.rates && (
<View

@ -21,6 +21,7 @@ import Svg, { G, Path } from "react-native-svg";
//components
import Navbar from "../../../../components/Navbar";
import CustomPressable from "../../../../components/Pressable";
import Empty from "../../../../components/Empty";
//style
import tw from "tailwind-rn";
@ -106,11 +107,7 @@ const ProfileAddress = ({
</Svg>
</View>
)}
<View
style={tw(
`flex w-full ${active ? "" : "flex-row-reverse"}`
)}
>
<View style={tw(`flex w-full ${active ? "" : "flex-row-reverse"}`)}>
<View style={tw("flex flex-1 mb-4")}>
<Text
style={[
@ -208,8 +205,8 @@ const ProfileAddress = ({
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
backgroundColor: "white",
flex : 1,
paddingBottom : 20
flex: 1,
paddingBottom: 20,
}}
>
<Navbar
@ -223,23 +220,27 @@ const ProfileAddress = ({
back: true,
}}
/>
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={[styles.container]}
onLayout={() => setHeight(Dimensions.get("window").height)}
>
<View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex ")}>
{addresses.map((address, index) => (
<Location
address={address}
key={index}
active={userAddressId === address?.id}
/>
))}
{addresses.length > 0 ? (
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={[styles.container]}
onLayout={() => setHeight(Dimensions.get("window").height)}
>
<View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex ")}>
{addresses.map((address, index) => (
<Location
address={address}
key={index}
active={userAddressId === address?.id}
/>
))}
</View>
</View>
</View>
</ScrollView>
</ScrollView>
) : (
<Empty text="هیچ آدرسی ثبت نشده :(" />
)}
<View style={tw("w-full px-4")}>
<TouchableOpacity
style={[

@ -16,10 +16,11 @@ import React from "react";
import { connect } from "react-redux";
import { useNavigation } from "@react-navigation/native";
import Svg, { Path } from "react-native-svg";
import {userFavorite} from '../../../../redux/actions';
import { userFavorite } from "../../../../redux/actions";
//components
import Navbar from "../../../../components/Navbar";
import Empty from "../../../../components/Empty";
//style
import tw from "tailwind-rn";
@ -33,10 +34,9 @@ const { height, width } = Dimensions.get("window");
const ios = Platform.OS === "ios";
const ProfileBookmark = ({ bookmarkList, getList }) => {
React.useEffect(() => {
getList();
},[]);
}, []);
return (
<SafeAreaView
@ -57,28 +57,33 @@ const ProfileBookmark = ({ bookmarkList, getList }) => {
back: true,
}}
/>
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
<View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex ")}>
{bookmarkList.map((bookmark, index) => (
<Bookmark key={index} bookmark={bookmark} />
))}
{bookmarkList?.length > 0 ? (
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
<View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex")}>
{bookmarkList?.map((bookmark, index) => (
<Bookmark key={index} bookmark={bookmark} />
))}
</View>
</View>
</View>
</ScrollView>
</ScrollView>
) : (
<Empty text="لیست علاقهمندیها خالی است." />
)}
</SafeAreaView>
);
};
const Bookmark = ({ bookmark }) => {
const colorScheme = Appearance.getColorScheme();
return (
<Pressable
style={[
tw("flex flex-row-reverse rounded-md justify-between px-3.5 py-2"),
tw("flex flex-row-reverse rounded-md justify-between px-3.5 py-2 bg-red-100"),
{
borderWidth: 1.5,
borderColor: Colors.theme1[colorScheme].greenCF,
@ -144,11 +149,11 @@ const Bookmark = ({ bookmark }) => {
const mapStateToProps = (state) => ({
loading: state.userFactor.loading,
mobile: state.publicApi.mobile,
bookmarkList : state.userFavorite.list
bookmarkList: state.userFavorite.list,
});
const mapDispatchToProps = {
getList : userFavorite.list,
getList: userFavorite.list,
};
export default connect(mapStateToProps, mapDispatchToProps)(ProfileBookmark);
@ -166,12 +171,12 @@ const styles = StyleSheet.create({
},
});
ProfileBookmark.defaultProps = {
bookmarkList: [
{
name: "کتاب آموزشی علوم تجربی",
grade: "پایه ششم ابتدایی",
image: bookImage,
},
],
};
// ProfileBookmark.defaultProps = {
// bookmarkList: [
// {
// name: "کتاب آموزشی علوم تجربی",
// grade: "پایه ششم ابتدایی",
// image: bookImage,
// },
// ],
// };

@ -58,7 +58,7 @@ const User = ({ user, mobile }) => {
fontFamily: "bold",
}}
>
{user?.firstName + " " + user?.lastName}
{(user?.firstName || " ") + " " + (user?.lastName || " ")}
</Text>
<Text
style={{
@ -93,7 +93,6 @@ const User = ({ user, mobile }) => {
}`
)}
>
<View
style={[
tw(`flex items-center w-full pb-3 mb-3 flex-row-reverse`),

@ -17,7 +17,7 @@ import { Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
import separate from "../../utils/separate";
import * as Linking from 'expo-linking';
import * as Linking from "expo-linking";
//components
import Product from "./components/Product";
@ -25,6 +25,7 @@ import Code from "./components/Code";
import CustomPressable from "../../components/Pressable";
import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer";
import Empty from "../../components/Empty";
//style
import fontSize from "../../constants/fontSize";
@ -103,7 +104,7 @@ function ShoppingCart({
.length !== 0;
useEffect(() => {
if(list.length === 0){
if (list.length === 0) {
getList();
}
getFactorInfo({ userId });
@ -135,128 +136,138 @@ function ShoppingCart({
}}
/>
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
{list
?.sort((a, b) => a?.id - b?.id)
?.map(
(product, index) =>
product.condition < 2 && (
<Product key={index} product={product} loading={loading} />
)
)}
<Code />
<View
style={tw(
"flex w-full border-t py-2 border-gray-300 border-b mt-6"
)}
>
<PriceStatus
name="مبلغ سبد خرید"
value={isEmpty ? 0 : separate(Math.round(factorInfo?.sumPrice))}
type="normal"
/>
<PriceStatus
name="میزان تخفیف"
value={isEmpty ? 0 : separate(Math.round(factorInfo?.offPrice))}
type="error"
/>
<PriceStatus
name="مالیات بر ارزش افزوده"
value={
isEmpty ? 0 : separate(Math.round(factorInfo?.sumPrice * 0.009))
}
type="error"
/>
</View>
<View
style={tw(
"flex flex-row-reverse justify-between items-center w-full py-3"
)}
{list?.filter((product) => product.condition < 2)?.length > 0 ? (
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={styles.container}
>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.base,
fontFamily: "bold",
},
]}
{list
?.sort((a, b) => a?.id - b?.id)
?.map(
(product, index) =>
product.condition < 2 && (
<Product key={index} product={product} loading={loading} />
)
)}
<Code />
<View
style={tw(
"flex w-full border-t py-2 border-gray-300 border-b mt-6"
)}
>
<PriceStatus
name="مبلغ سبد خرید"
value={isEmpty ? 0 : separate(Math.round(factorInfo?.sumPrice))}
type="normal"
/>
<PriceStatus
name="میزان تخفیف"
value={isEmpty ? 0 : separate(Math.round(factorInfo?.offPrice))}
type="error"
/>
<PriceStatus
name="مالیات بر ارزش افزوده"
value={
isEmpty ? 0 : separate(Math.round(factorInfo?.sumPrice * 0.009))
}
type="error"
/>
</View>
<View
style={tw(
"flex flex-row-reverse justify-between items-center w-full py-3"
)}
>
جمع کل سبد خرید
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontSize: fontSize.base,
fontFamily: "bold",
},
]}
>
{isEmpty ? 0 : separate(factorInfo?.payPrice)}
</Text>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
marginRight: 4,
},
]}
>
تومان
جمع کل سبد خرید
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.xl,
fontFamily: "bold",
},
]}
>
{isEmpty ? 0 : separate(factorInfo?.payPrice)}
</Text>
<Text
style={[
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
marginRight: 4,
},
]}
>
تومان
</Text>
</View>
</View>
</View>
<View style={tw("w-full")}>
<Pressable
style={[
tw(
"w-full rounded-md flex flex-row justify-center items-center py-3 px-3 my-5"
),
{ backgroundColor: Colors.theme1[colorScheme].greenC8 + "1a" },
]}
>
<Text
<View style={tw("w-full")}>
<Pressable
style={[
tw("mr-1"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
},
tw(
"w-full rounded-md flex flex-row justify-center items-center py-3 px-3 my-5"
),
{ backgroundColor: Colors.theme1[colorScheme].greenC8 + "1a" },
]}
>
هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود
</Text>
<Ionicons
name="alert-circle-outline"
size={20}
color={Colors.theme1[colorScheme].greenC8}
/>
</Pressable>
<Text
style={[
tw("mr-1"),
{
color: Colors.theme1[colorScheme].green79,
fontSize: fontSize.sm,
fontFamily: "regular",
},
]}
>
هزینه ارسال کالا پس از تعیین محل آدرس مشخص میشود
</Text>
<Ionicons
name="alert-circle-outline"
size={20}
color={Colors.theme1[colorScheme].greenC8}
/>
</Pressable>
<CustomPressable
title={hasPhysical ? "ادامه فرایند خرید" : "پرداخت"}
backgroundColor={Colors.theme1[colorScheme].greenCF}
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
onPress={() =>
isEmpty
? asyncAwesomeAlert("خطا", "سبد خرید شما خالی است.", {
showCancelButton: false,
})
: hasPhysical ? navigation.push("DeliveryForm") : payFactor({userId})
}
/>
</View>
</ScrollView>
<CustomPressable
title={hasPhysical ? "ادامه فرایند خرید" : "پرداخت"}
backgroundColor={Colors.theme1[colorScheme].greenCF}
color={"white"}
border={{ color: "#196EC0", width: 0 }}
width={"100%"}
onPress={() =>
isEmpty
? asyncAwesomeAlert("خطا", "سبد خرید شما خالی است.", {
showCancelButton: false,
})
: hasPhysical
? navigation.push("DeliveryForm")
: payFactor({ userId })
}
/>
</View>
</ScrollView>
) : (
<Empty
text={"سبد خرید شما خالی است"}
buttonText={"فروشگاه"}
buttonAction={() => navigation.navigate("Products")}
/>
)}
</SafeAreaView>
);
}

@ -35,8 +35,6 @@ function VideoDisplay({ route, mobile }) {
const [status, setStatus] = React.useState({});
const [position, setPosition] = useState("100%");
useEffect(() => {}, []);
const setBoxPosition = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setPosition(position === "100%" ? "0%" : "100%");

Loading…
Cancel
Save