reza added blog

master
Reza_ashrafi 3 years ago
parent 97fbc5d3ca
commit 95032a3d38
  1. 11
      navigation/vuesax-linear-bag-2.svg
  2. 2
      src/components/BottomSheetComponents/ProductQuestion.js
  3. 2
      src/components/BottomSheetComponents/ProductReview.js
  4. 8
      src/components/Drawer.js
  5. 2
      src/components/Header.js
  6. 2
      src/components/Redirect.js
  7. 9
      src/screens/AR/components/Book.js
  8. 6
      src/screens/Activation/index.js
  9. 4
      src/screens/Address/index.js
  10. 219
      src/screens/Blog/index.js
  11. 29
      src/screens/Blogs/layouts/Hashtags.js
  12. 14
      src/screens/Blogs/layouts/New.js
  13. 19
      src/screens/Blogs/layouts/Single.js
  14. 36
      src/screens/Blogs/layouts/Target.js
  15. 2
      src/screens/Contact/Box.js
  16. 2
      src/screens/Contact/index.js
  17. 4
      src/screens/DeliveryForm/Address/index.js
  18. 2
      src/screens/DeliveryForm/TransportDate/index.js
  19. 2
      src/screens/DeliveryForm/TransportMethod/index.js
  20. 2
      src/screens/DeliveryForm/index.js
  21. 2
      src/screens/Faq/components/Instance.js
  22. 2
      src/screens/Faq/index.js
  23. 11
      src/screens/Home/components/Blogs.js
  24. 4
      src/screens/Home/components/MyBooks.js
  25. 4
      src/screens/Home/components/Scroll.js
  26. 4
      src/screens/Home/components/Videos.js
  27. 2
      src/screens/Login/index.js
  28. 2
      src/screens/OrderDetails/components/Book.js
  29. 4
      src/screens/OrderDetails/index.js
  30. 6
      src/screens/OrdersFollowUp/components/Order.js
  31. 8
      src/screens/Product/components/Book.js
  32. 2
      src/screens/Product/components/Comments.js
  33. 2
      src/screens/Product/components/Description.js
  34. 4
      src/screens/Product/components/Rates.js
  35. 2
      src/screens/Products/components/Header.js
  36. 2
      src/screens/Products/components/Main.js
  37. 2
      src/screens/Profile/components/List.js
  38. 8
      src/screens/Profile/components/ProfileAddress/index.js
  39. 4
      src/screens/Profile/components/ProfileBookmark/index.js
  40. 6
      src/screens/Profile/components/User.js
  41. 2
      src/screens/QR/Scan/index.js
  42. 2
      src/screens/QRContent/Content/Links.js
  43. 4
      src/screens/QRContent/Content/Video.js
  44. 2
      src/screens/QRContent/Content/Voice.js
  45. 6
      src/screens/QRContent/Content/index.js
  46. 4
      src/screens/QRContent/Tab/index.js
  47. 2
      src/screens/ShoppingCart/components/Code.js
  48. 6
      src/screens/ShoppingCart/components/Product.js
  49. 2
      src/screens/ShoppingCart/index.js
  50. 6
      src/screens/Video/components/Season.js
  51. 8
      src/screens/Video/index.js
  52. 4
      src/screens/VideoDisplay/components/Season/index.js
  53. 4
      src/screens/VideoDisplay/index.js
  54. 4
      src/screens/Videos/components/MostViewedVideo.js
  55. 4
      src/screens/Videos/components/NewestVideo.js
  56. 2
      src/screens/Videos/components/VerticalGradeFilter.js

@ -1,11 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31.017" height="31.017" viewBox="0 0 31.017 31.017">
<g id="vuesax_linear_bag-2" data-name="vuesax/linear/bag-2" transform="translate(-556 -188)">
<g id="bag-2" transform="translate(556 188)">
<path id="Vector" d="M0,7.317V6.064A6.168,6.168,0,0,1,5.247.028a5.816,5.816,0,0,1,6.384,5.79V7.6" transform="translate(9.693 2.595)" fill="none" stroke="#292d32" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M7.432,18.094h7.754c5.2,0,6.126-2.081,6.4-4.614l.969-7.754C22.9,2.572,22,0,16.479,0H6.14C.621,0-.283,2.572.066,5.725l.969,7.754C1.306,16.013,2.237,18.094,7.432,18.094Z" transform="translate(4.199 10.339)" fill="none" stroke="#292d32" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M.495.5H.506" transform="translate(19.532 15.009)" fill="none" stroke="#292d32" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.495.5H.506" transform="translate(10.484 15.009)" fill="none" stroke="#292d32" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H31.017V31.017H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

@ -22,7 +22,7 @@ const ProductQuestion = ({ list, mobile }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const Question = ({ question }) => { const Question = ({ question }) => {
return ( return (
<View style={[tw("flex flex-col mb-3")]}> <View style={[tw("flex mb-3")]}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",

@ -14,7 +14,7 @@ const ProductReviews = ({ list, mobile }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const Property = ({ question }) => { const Property = ({ question }) => {
return ( return (
<View style={[tw("flex flex-col mb-3")]}> <View style={[tw("flex mb-3")]}>
<View <View
onPress={() => refRBSheet.current.open()} onPress={() => refRBSheet.current.open()}
style={[ style={[

@ -134,10 +134,10 @@ const Drawer = ({ position, setBoxPosition, user, mobile }) => {
), ),
]} ]}
></Pressable> ></Pressable>
<View style={[tw("w-4/5 bg-white h-full flex flex-col")]}> <View style={[tw("w-4/5 bg-white h-full flex ")]}>
<View <View
style={[ style={[
tw("flex flex-col items-end pt-12 pb-1 px-4"), tw("flex items-end pt-12 pb-1 px-4"),
{ backgroundColor: Colors.theme1[colorScheme].greenCF }, { backgroundColor: Colors.theme1[colorScheme].greenCF },
]} ]}
> >
@ -166,7 +166,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile }) => {
"flex flex-row-reverse w-full justify-between px-2 pb-3 mt-2" "flex flex-row-reverse w-full justify-between px-2 pb-3 mt-2"
)} )}
> >
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
<Text <Text
style={{ style={{
fontSize: mobile ? fontSize.lg : fontSize.xl, fontSize: mobile ? fontSize.lg : fontSize.xl,
@ -206,7 +206,7 @@ const Drawer = ({ position, setBoxPosition, user, mobile }) => {
</Svg> </Svg>
</View> </View>
</View> </View>
<View style={tw("flex-1 flex flex-col px-4")}> <View style={tw("flex-1 flex px-4")}>
{routes.map((route, index) => ( {routes.map((route, index) => (
<Route route={route} key={index} /> <Route route={route} key={index} />
))} ))}

@ -9,7 +9,7 @@ function Header({ title, description, background }) {
return ( return (
<View <View
style={[ style={[
tw(`w-full flex flex-col items-center pb-7`), tw(`w-full flex items-center pb-7`),
{ height: height / 4.5, backgroundColor: "#E9F0F7" }, { height: height / 4.5, backgroundColor: "#E9F0F7" },
]} ]}
> >

@ -14,7 +14,7 @@ export default function Redirect({ text }) {
{ backgroundColor: "#196EC0" }, { backgroundColor: "#196EC0" },
]} ]}
> >
<View style={tw("flex-1 flex flex-col")}> <View style={tw("flex-1 flex ")}>
<Text <Text
style={[ style={[
tw("font-medium text-right"), tw("font-medium text-right"),

@ -17,18 +17,19 @@ const Book = ({ book, mobile }) => {
return ( return (
<Pressable <Pressable
style={[ style={[
tw("flex flex-col items-end rounded-md p-2 my-2"), tw("flex items-end rounded-md p-2 my-2"),
{ width: mobile ? "48%" : width / 4.2 }, { width: mobile ? "48%" : width / 4.2 },
]} ]}
onPress={() => Linking.openURL(`https://ar.dnvn.ir/lunch?id=${book.id}`)} onPress={() => Linking.openURL(`https://ar.dnvn.ir/lunch?id=${book.id}`)}
> >
<Image <Image
source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileId}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${book.fileId}` }}
resizeMode="contain"
style={[ style={[
tw("rounded-md"), tw("rounded-sm w-full"),
{ {
width: "100%", height: mobile ? (width - 32) / 2 * 3 / 3.5 : 200,
height: ((mobile ? width / 2 - 36 : width / 4.2) * 4) / 3, flex : 1,
}, },
]} ]}
/> />

@ -44,7 +44,7 @@ function Activation({ add, mobile }) {
<TouchableWithoutFeedback> <TouchableWithoutFeedback>
<View <View
style={[ style={[
tw("flex-1 justify-between flex flex-col"), tw("flex-1 justify-between flex "),
{ paddingTop: StatusBar.currentHeight }, { paddingTop: StatusBar.currentHeight },
]} ]}
> >
@ -61,7 +61,7 @@ function Activation({ add, mobile }) {
backgroundColor: "#E9F0F7", backgroundColor: "#E9F0F7",
}} }}
/> />
<View style={tw("flex flex-col w-full")}> <View style={tw("flex w-full")}>
<TopHeader <TopHeader
background={bgQr} background={bgQr}
title={"فعالسازی کتاب دیجیتال"} title={"فعالسازی کتاب دیجیتال"}
@ -83,7 +83,7 @@ function Activation({ add, mobile }) {
</View> </View>
</View> </View>
</View> </View>
<View style={tw("w-full flex flex-col px-4")}> <View style={tw("w-full flex px-4")}>
<TextInput <TextInput
placeholder="کد فعالسازی" placeholder="کد فعالسازی"
placeholderTextColor="#70707070" placeholderTextColor="#70707070"

@ -214,7 +214,7 @@ const Address = ({
const Header = ({ title, text }) => { const Header = ({ title, text }) => {
return ( return (
<View style={tw(`flex flex-col ${mobile ? "mt-2" : "mt-8"}`)}> <View style={tw(`flex ${mobile ? "mt-2" : "mt-8"}`)}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
@ -261,7 +261,7 @@ const Address = ({
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
> >
<View style={tw("w-full flex flex-col pb-4")}> <View style={tw("w-full flex pb-4")}>
{/* <MapSelector /> */} {/* <MapSelector /> */}
<Header <Header
title="اطلاعات هویتی" title="اطلاعات هویتی"

@ -1,13 +1,214 @@
import React from 'react' import React, { useEffect } from "react";
import { View, Text } from 'react-native'; import {
import {connect} from 'react-redux'; View,
Text,
FlatList,
Image,
SafeAreaView,
ScrollView,
StyleSheet,
Platform,
Dimensions,
Appearance,
} from "react-native";
import { WebView } from "react-native-webview";
import { connect } from "react-redux";
import { blog, publicApi } from "../../redux/actions";
import { LinearGradient } from "expo-linear-gradient";
import Hashtags from "../Blogs/layouts/Hashtags";
import Header from "../Blogs/layouts/Header";
import New from "../Blogs/layouts/New";
import Navbar from "../../components/Navbar";
//assets
import tw from "tailwind-rn";
import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
const ios = Platform.OS === "ios";
const { height, width } = Dimensions.get("window");
export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
const colorScheme = Appearance.getColorScheme();
useEffect(() => {
getInfo({ id: route.params.id });
if (blogs.length === 0) {
getList();
}
}, []);
function Blog({}) {
return ( return (
<View> <SafeAreaView
<Text></Text> style={{
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
position: "relative",
}}
>
<Navbar
headerOptions={{
logo: false,
menu: false,
hamburgerMenu: false,
title: "",
bookmark: true,
qr: false,
back: true,
}}
/>
<ScrollView
contentContainerStyle={styles.contentContainerStyle}
style={[styles.container, tw("flex")]}
>
<View style={tw("flex px-4 pb-24")}>
<Hashtags />
<View
style={[
tw("w-full rounded-sm overflow-hidden relative bg-red-300"),
{ height: ((width - 32) / 4) * 2.8 },
]}
>
<Image
source={{ uri: `https:dnvn.ir/api/v1/file/${blog?.fileIds}` }}
resizeMode="contain"
style={tw("w-full h-full absolute left-0 top-0")}
/>
<LinearGradient
colors={["transparent", "rgba(0,0,0,0.9)"]}
start={{ x: 0.0, y: 0.0 }}
end={{ x: 0.0, y: 1.1 }}
style={tw(
"flex justify-end absolute top-0 left-0 z-10 w-full h-full pb-2 px-0"
)}
>
<View
style={tw(
"flex justify-end absolute top-0 left-0 z-10 w-full h-full pb-0 px-2"
)}
>
<View
style={tw(
"w-full flex flex-row-reverse items-center justify-between"
)}
>
<View style={tw("flex")}>
<View style={tw("flex py-2 justify-center")}>
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
fontSize: fontSize.tiny,
textAlign: ios ? "right" : "auto",
}}
>
{"نوشته از:" + " " + "کامران ایزدی"}
</Text>
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
fontSize: fontSize.tiny,
textAlign: ios ? "right" : "auto",
}}
>
{"سردبیر بخش وبلاگ دانوین"}
</Text>
</View> </View>
) </View>
} <View style="flex justify-center items-end">
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
fontSize: fontSize.sm,
textAlign: ios ? "left" : "left",
}}
>
{"زمان مطالعه" + " " + "۳۰ دقیقه"}
</Text>
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
fontSize: fontSize.sm,
textAlign: ios ? "left" : "left",
}}
>
{"1400/11/24"}
</Text>
</View>
</View>
</View>
</LinearGradient>
</View>
<View style={[tw("flex my-5"), { textAlign: "right" }]}>
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.base,
textAlign: ios ? "right" : "auto",
}}
>
{blog?.title}
</Text>
{blog?.text && (
<WebView
style={[
tw(
"flex-1 w-full flex flex-row items-center justify-center text-left"
),
{ fontSize: fontSize.base },
]}
originWhitelist={["*"]}
source={{ html: "<h1>reza</h1>", textAlign: "right" }}
containerStyle={{
textAlign: "right",
fontSize: fontSize.base,
display: "flex",
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
/>
)}
</View>
<Header title={"پیشنهادی "} />
<FlatList
showsHorizontalScrollIndicator={false}
horizontal={true}
inverted={true}
style={[tw("flex flex-row mt-3 pb-3")]}
data={blogs}
renderItem={({ item }) => <New blog={item} />}
keyExtractor={(item) => item.id}
/>
</View>
</ScrollView>
</SafeAreaView>
);
};
const mapStateToProps = (state) => ({
blog: state.blog.blog,
blogs: state.blog.list,
});
const mapDispatchToProps = {
getInfo: blog.info,
getList: blog.list,
setHeaderOptions: publicApi.setHeaderOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(Blog);
export default Blog; const styles = StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
},
container: {
backgroundColor: "white",
paddingVertical: 0,
paddingHorizontal: 0,
},
});

@ -10,20 +10,6 @@ import Colors from "../../../constants/Colors";
export const Hashtags = ({ hashtags }) => { export const Hashtags = ({ hashtags }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const Hashtag = ({ hashtag }) => {
return (
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.base,
color: hashtag.color,
marginHorizontal: 8,
}}
>
{"#" + " " + hashtag.title}
</Text>
);
};
return ( return (
<View <View
style={[ style={[
@ -56,6 +42,21 @@ export const Hashtags = ({ hashtags }) => {
); );
}; };
const Hashtag = ({ hashtag }) => {
return (
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color: hashtag.color,
marginHorizontal: 8,
}}
>
{"#" + " " + hashtag.title}
</Text>
);
};
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
hashtags: state.blog.hashtags, hashtags: state.blog.hashtags,
}); });

@ -8,7 +8,6 @@ import {
Appearance, Appearance,
Platform, Platform,
} from "react-native"; } from "react-native";
import { connect } from "react-redux";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
//style //style
@ -16,7 +15,7 @@ import tw from "tailwind-rn";
import fontSize from "../../../constants/fontSize"; import fontSize from "../../../constants/fontSize";
import Colors from "../../../constants/Colors"; import Colors from "../../../constants/Colors";
const { height, width } = Dimensions.get("window"); const { width } = Dimensions.get("window");
const ios = Platform.OS === "ios"; const ios = Platform.OS === "ios";
export const New = ({ blog }) => { export const New = ({ blog }) => {
@ -25,7 +24,7 @@ export const New = ({ blog }) => {
return ( return (
<Pressable <Pressable
style={[ style={[
tw(`flex flex-col ml-4 ${ios ? "items-end" : ""}`), tw(`flex ml-4 ${ios ? "items-end" : ""}`),
{ {
width: width / 2, width: width / 2,
}, },
@ -34,14 +33,15 @@ export const New = ({ blog }) => {
> >
<Image <Image
source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }}
resizeMode="contain"
style={[ style={[
tw("rounded-md"), tw("rounded-sm"),
{ width: "100%", height: ((width / 2) * 3) / 4 }, { width: "100%", height: ((width / 2) * 3) / 4.2 },
]} ]}
/> />
<Text <Text
style={{ style={{
fontSize: fontSize.base, fontSize: fontSize.tiny,
fontFamily: "bold", fontFamily: "bold",
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
marginTop: 5, marginTop: 5,
@ -52,7 +52,7 @@ export const New = ({ blog }) => {
</Text> </Text>
<Text <Text
style={{ style={{
fontSize: fontSize.sm, fontSize: fontSize.xs,
fontFamily: "regular", fontFamily: "regular",
color: Colors.theme1[colorScheme].gray2077, color: Colors.theme1[colorScheme].gray2077,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",

@ -25,18 +25,19 @@ export const Single = ({ blog }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
return ( return (
<Pressable <Pressable
style={tw("flex flex-col")} style={tw("flex ")}
onPress={() => navigation.push("Blog", { id: blog?.id })} onPress={() => navigation.push("Blog", { id: blog?.id })}
> >
<View <View
style={[ style={[
tw("w-full rounded-md overflow-hidden relative"), tw("w-full rounded-sm overflow-hidden relative"),
{ {
height: ((width - 32) * 3) / 4.5, height: ((width - 32) * 3) / 4.5,
}, },
]} ]}
> >
<Image <Image
resizeMode="contain"
source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }}
style={[tw("absolute left-0 top-0 w-full h-full ml-2")]} style={[tw("absolute left-0 top-0 w-full h-full ml-2")]}
/> />
@ -45,7 +46,7 @@ export const Single = ({ blog }) => {
start={{ x: 0.0, y: 0.0 }} start={{ x: 0.0, y: 0.0 }}
end={{ x: 0.0, y: 1.1 }} end={{ x: 0.0, y: 1.1 }}
style={tw( style={tw(
"flex flex-col justify-end absolute top-0 left-0 z-10 w-full h-full pb-2 px-2" "flex justify-end absolute top-0 left-0 z-10 w-full h-full pb-2 px-2"
)} )}
> >
<View style={tw("w-full flex flex-row-reverse justify-between")}> <View style={tw("w-full flex flex-row-reverse justify-between")}>
@ -56,7 +57,7 @@ export const Single = ({ blog }) => {
tw("rounded-full ml-1"), tw("rounded-full ml-1"),
]} ]}
></View> ></View>
<View style="flex flex-col py-2 justify-center"> <View style="flex py-2 justify-center">
<Text <Text
style={[ style={[
tw("text-gray-100"), tw("text-gray-100"),
@ -83,7 +84,7 @@ export const Single = ({ blog }) => {
</Text> </Text>
</View> </View>
</View> </View>
<View style={tw("flex flex-col justify-center items-start")}> <View style={tw("flex justify-center items-start")}>
<Text <Text
style={[ style={[
tw("text-gray-100"), tw("text-gray-100"),
@ -104,12 +105,12 @@ export const Single = ({ blog }) => {
</View> </View>
</LinearGradient> </LinearGradient>
</View> </View>
<View style={tw("flex flex-col justify-between")}> <View style={tw("flex justify-between")}>
<View style={tw("flex flex-col mt-3")}> <View style={tw("flex mt-3")}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.xl, fontSize: fontSize.lg,
color: Colors.theme1[colorScheme].gray20, color: Colors.theme1[colorScheme].gray20,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}} }}
@ -119,7 +120,7 @@ export const Single = ({ blog }) => {
<Text <Text
style={{ style={{
fontFamily: "regular", fontFamily: "regular",
fontSize: fontSize.tiny, fontSize: fontSize.sm,
color: Colors.theme1[colorScheme].gray2077, color: Colors.theme1[colorScheme].gray2077,
lineHeight: 25, lineHeight: 25,
marginTop: 10, marginTop: 10,

@ -25,21 +25,25 @@ const Target = ({ blogs }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const Large = ({ blog }) => { const Large = ({ blog }) => {
return ( return (
<Pressable style={tw("flex flex-col w-full")}> <Pressable
style={tw("flex w-full")}
onPress={() => navigation.push("Blog", { id: blog?.id })}
>
<View <View
className="relative w-full rounded-md overflow-hidden" className="relative w-full rounded-md overflow-hidden"
style={{ height: ((width - 32) / 4) * 3 }} style={{ height: ((width - 32) / 4) * 2.8 }}
> >
<Image <Image
resizeMode="contain"
source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }}
style={tw("w-full h-full absolute left-0 top-0 rounded-md")} style={tw("w-full h-full absolute left-0 top-0 rounded-sm")}
/> />
<LinearGradient <LinearGradient
colors={["transparent", "rgba(0,0,0,0.8)"]} colors={["transparent", "rgba(0,0,0,0.8)"]}
start={{ x: 0.0, y: 0.0 }} start={{ x: 0.0, y: 0.0 }}
end={{ x: 0.0, y: 1.1 }} end={{ x: 0.0, y: 1.1 }}
style={tw( style={tw(
"flex flex-col justify-end rounded-md absolute top-0 left-0 z-10 w-full h-full pb-2 px-2" "flex justify-end rounded-md absolute top-0 left-0 z-10 w-full h-full pb-2 px-2"
)} )}
></LinearGradient> ></LinearGradient>
</View> </View>
@ -48,7 +52,7 @@ const Target = ({ blogs }) => {
tw("my-3"), tw("my-3"),
{ {
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.xl, fontSize: fontSize.lg,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}, },
]} ]}
@ -64,9 +68,7 @@ const Target = ({ blogs }) => {
]} ]}
></View> ></View>
<View <View
style={tw( style={tw(`flex py-2 justify-center ${ios ? "items-end" : ""}`)}
`flex flex-col py-2 justify-center ${ios ? "items-end" : ""}`
)}
> >
<Text <Text
style={[ style={[
@ -92,7 +94,7 @@ const Target = ({ blogs }) => {
</Text> </Text>
</View> </View>
</View> </View>
<View style={tw("flex flex-col justify-center items-start")}> <View style={tw("flex justify-center items-start")}>
<Text <Text
style={[ style={[
{ {
@ -124,21 +126,25 @@ const Target = ({ blogs }) => {
const Small = ({ blog }) => { const Small = ({ blog }) => {
return ( return (
<Pressable style={[tw("flex flex-col"), { width: "48%" }]}> <Pressable
style={[tw("flex "), { width: "48%" }]}
onPress={() => navigation.push("Blog", { id: blog?.id })}
>
<Image <Image
resizeMode="contain"
source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${blog?.fileIds}` }}
style={[ style={[
tw("w-full rounded-md"), tw("w-full rounded-sm"),
{ height: ((((width - 32) * 48) / 100) * 3) / 4 }, { height: ((((width - 32) * 48) / 100) * 3) / 4.4 },
]} ]}
/> />
<View style={tw("flex flex-col justify-center")}> <View style={tw("flex justify-center")}>
<Text <Text
style={[ style={[
tw("my-2"), tw("my-2"),
{ {
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.lg, fontSize: fontSize.sm,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}, },
]} ]}
@ -150,7 +156,7 @@ const Target = ({ blogs }) => {
); );
}; };
return ( return (
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
<Large blog={blogs[0]} /> <Large blog={blogs[0]} />
<View style={tw("flex flex-row justify-between mt-4")}> <View style={tw("flex flex-row justify-between mt-4")}>
{blogs?.slice(1, 3).map((blog, index) => ( {blogs?.slice(1, 3).map((blog, index) => (

@ -28,7 +28,7 @@ const Box = ({ info, mobile }) => {
source={info.icon} source={info.icon}
style={{ width: mobile ? 40 : 55, height: mobile ? 40 : 55 }} style={{ width: mobile ? 40 : 55, height: mobile ? 40 : 55 }}
/> />
<View style={tw("flex flex-col flex-1 mr-3")}> <View style={tw("flex flex-1 mr-3")}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",

@ -49,7 +49,7 @@ function Contact({ info }) {
title={"ارتباط با ما"} title={"ارتباط با ما"}
description={"تیم پشتیبانی ما اینجاست تا شما رو کمک کنه"} description={"تیم پشتیبانی ما اینجاست تا شما رو کمک کنه"}
/> />
<ScrollView style={[tw("bg-white flex flex-col pb-20 px-4 mb-4")]}> <ScrollView style={[tw("bg-white flex pb-20 px-4 mb-4")]}>
{Object.keys(info).map((item, index) => ( {Object.keys(info).map((item, index) => (
<Box info={info[item]} key={index} /> <Box info={info[item]} key={index} />
))} ))}

@ -70,7 +70,7 @@ const Address = ({ addresses, update, userId, userAddressId, loading, mobile })
]} ]}
></View> ></View>
)} )}
<View style={tw(`flex flex-1 flex-col ${mobile ? "mr-2" : "mr-5"}`)}> <View style={tw(`flex flex-1 ${mobile ? "mr-2" : "mr-5"}`)}>
<Text <Text
style={[ style={[
{ {
@ -90,7 +90,7 @@ const Address = ({ addresses, update, userId, userAddressId, loading, mobile })
return ( return (
<View style={tw("w-full mt-2")}> <View style={tw("w-full mt-2")}>
<View style={tw("p-0 m-0 flex flex-col")}> <View style={tw("p-0 m-0 flex ")}>
{addresses.map((address, index) => ( {addresses.map((address, index) => (
<Location <Location
address={address} address={address}

@ -80,7 +80,7 @@ const TransportDate = ({ transportDate, mobile }) => {
> >
زمان ارسال را انتخاب کنید. زمان ارسال را انتخاب کنید.
</Text> </Text>
<View style={tw("p-0 m-0 flex flex-col w-full")}> <View style={tw("p-0 m-0 flex w-full")}>
{transportDate?.times?.map((time, index) => ( {transportDate?.times?.map((time, index) => (
<Time time={time} key={index} active={time === activeDate} /> <Time time={time} key={index} active={time === activeDate} />
))} ))}

@ -127,7 +127,7 @@ const TransportMethod = ({
> >
لطفا یک روش ارسال انتخاب کنید. لطفا یک روش ارسال انتخاب کنید.
</Text> </Text>
<View style={tw("p-0 m-0 flex flex-col w-full")}> <View style={tw("p-0 m-0 flex w-full")}>
{list?.map((method, index) => ( {list?.map((method, index) => (
<Method <Method
method={method} method={method}

@ -59,7 +59,7 @@ const DeliveryForm = ({ list, form, getList, getFactorInfo, userId, payFactor, f
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
> >
<View style={tw("w-full flex flex-col pb-4")}> <View style={tw("w-full flex pb-4")}>
<View style={tw("w-full flex flex-row")}> <View style={tw("w-full flex flex-row")}>
<Address addresses={list} /> <Address addresses={list} />
</View> </View>

@ -21,7 +21,7 @@ function Instance({ question, selectFaq, mobile }) {
onPress={() => selectFaq(question.id)} onPress={() => selectFaq(question.id)}
style={[ style={[
tw( tw(
`w-full flex flex-col my-1.5 rounded-md px-4 ${ `w-full flex my-1.5 rounded-md px-4 ${
mobile ? "py-2" : "py-3" mobile ? "py-2" : "py-3"
}` }`
), ),

@ -61,7 +61,7 @@ function Faq({ list, getFaq, searchResult, search, selectFaq, searchFaq }) {
/> />
</View> </View>
<ScrollView <ScrollView
style={[tw("bg-white flex flex-col pb-20 px-4 mb-4")]} style={[tw("bg-white flex pb-20 px-4 mb-4")]}
> >
{!search {!search
? list.length > 0 && ? list.length > 0 &&

@ -11,7 +11,7 @@ import {
Platform, Platform,
} from "react-native"; } from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Svg, { G, Path } from "react-native-svg"; import { useNavigation} from '@react-navigation/native';
//components //components
import Header from "../components/Header"; import Header from "../components/Header";
@ -29,7 +29,7 @@ const ios = Platform.OS === "ios";
function Blogs({ blogs, mobile }) { function Blogs({ blogs, mobile }) {
return ( return (
<View style={[tw("flex flex-col pr-3 mb-5")]}> <View style={[tw("flex pr-3 mb-5")]}>
<View style={tw("w-full pl-3")}> <View style={tw("w-full pl-3")}>
<Header title={"خواندنیها"} route={"Blogs"} /> <Header title={"خواندنیها"} route={"Blogs"} />
</View> </View>
@ -41,6 +41,7 @@ function Blogs({ blogs, mobile }) {
data={blogs} data={blogs}
renderItem={({ item }) => <Blog blog={item} mobile={mobile} />} renderItem={({ item }) => <Blog blog={item} mobile={mobile} />}
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
initialNumToRender={5}
/> />
</View> </View>
); );
@ -48,13 +49,15 @@ function Blogs({ blogs, mobile }) {
const Blog = ({ blog, mobile }) => { const Blog = ({ blog, mobile }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const navigation = useNavigation();
return ( return (
<Pressable <Pressable
style={[ style={[
tw("rounded-md ml-3 rounded-md relative"), tw("rounded-md ml-3 rounded-md relative"),
{ width: mobile ? 250 : width / 2.2 }, { width: mobile ? 250 : width / 2.2 },
]} ]}
// onPress={() => navigation.navigate('Product')} onPress={() => navigation.push("Blog", { id: blog?.id })}
> >
<Image <Image
source={{ uri: `https://dnvn.ir/api/v1/file/${blog.fileIds}` }} source={{ uri: `https://dnvn.ir/api/v1/file/${blog.fileIds}` }}
@ -70,7 +73,7 @@ const Blog = ({ blog, mobile }) => {
<View <View
style={[ style={[
{ transform: [{ translateY: -40 }], marginHorizontal: 10 }, { transform: [{ translateY: -40 }], marginHorizontal: 10 },
tw("flex flex-col justify-between bg-white rounded-md p-2"), tw("flex justify-between bg-white rounded-md p-2"),
{ {
shadowColor: "#00000055", shadowColor: "#00000055",
shadowOffset: { width: 0, height: 1 }, shadowOffset: { width: 0, height: 1 },

@ -27,7 +27,7 @@ function MyBooks({ books, grades }) {
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<Pressable <Pressable
style={tw(`flex flex-col ml-3 ${ios ? "items-end" : ""}`)} style={tw(`flex ml-3 ${ios ? "items-end" : ""}`)}
onPress={() => {}} onPress={() => {}}
> >
<View style={{ height: 165 }}> <View style={{ height: 165 }}>
@ -77,7 +77,7 @@ function MyBooks({ books, grades }) {
<View style={[tw("flex w-full px-4 mb-5")]}> <View style={[tw("flex w-full px-4 mb-5")]}>
<View <View
style={[ style={[
tw(`w-full flex flex-col rounded-md pt-3 px-2 overflow-hidden`), tw(`w-full flex rounded-md pt-3 px-2 overflow-hidden`),
{ {
backgroundColor: Colors.theme1[colorScheme].greenCF + "0F", backgroundColor: Colors.theme1[colorScheme].greenCF + "0F",
borderColor: Colors.theme1[colorScheme].greenD9 + "", borderColor: Colors.theme1[colorScheme].greenD9 + "",

@ -44,7 +44,7 @@ function Scroll({ books, mobile }) {
<View <View
style={[ style={[
tw( tw(
`flex flex-col justify-between ${ `flex justify-between ${
ios ? "flex-wrap" : "flex-wrap-reverse" ios ? "flex-wrap" : "flex-wrap-reverse"
}` }`
), ),
@ -58,7 +58,7 @@ function Scroll({ books, mobile }) {
); );
}; };
return ( return (
<View style={[tw(`flex flex-col pr-3 mb-5`)]}> <View style={[tw(`flex pr-3 mb-5`)]}>
<FlatList <FlatList
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
horizontal={true} horizontal={true}

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

@ -56,7 +56,7 @@ function Login(props) {
behavior={ios ? "padding" : "height"} behavior={ios ? "padding" : "height"}
style={[ style={[
tw( tw(
`flex flex-col flex-1 justify-center items-center bg-white px-4 relative` `flex flex-1 justify-center items-center bg-white px-4 relative`
), ),
]} ]}
> >

@ -33,7 +33,7 @@ function Book({ book, mobile }) {
}, },
]} ]}
/> />
<View style={tw("flex flex-col items-end mr-2")}> <View style={tw("flex items-end mr-2")}>
<Text <Text
style={[ style={[
{ {

@ -210,7 +210,7 @@ function OrderDetails({ order, mobile }) {
</View> </View>
<View <View
style={[ style={[
tw("w-full rounded-md flex flex-col p-4 items-end mt-2"), tw("w-full rounded-md flex p-4 items-end mt-2"),
{ backgroundColor: Colors.theme1[colorScheme].greenFF1 + 'aa' }, { backgroundColor: Colors.theme1[colorScheme].greenFF1 + 'aa' },
]} ]}
> >
@ -238,7 +238,7 @@ function OrderDetails({ order, mobile }) {
این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید این کد را پس از دریافت کالا، به مامور ارسال دانوین اعلام فرمایید
</Text> </Text>
</View> </View>
<View style={tw("w-full flex flex-col items-end")}> <View style={tw("w-full flex items-end")}>
{order.items.map((item, index) => ( {order.items.map((item, index) => (
<Book book={item} key={index} /> <Book book={item} key={index} />
))} ))}

@ -40,7 +40,7 @@ function Order({ order, mobile }) {
return ( return (
<View <View
style={[ style={[
tw("w-full flex flex-col rounded-md overflow-hidden my-3"), tw("w-full flex rounded-md overflow-hidden my-3"),
{ {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenCF + "22", borderColor: Colors.theme1[colorScheme].greenCF + "22",
@ -91,7 +91,7 @@ function Order({ order, mobile }) {
</View> </View>
</View> </View>
<View style={tw("w-full flex flex-row-reverse justify-between p-3")}> <View style={tw("w-full flex flex-row-reverse justify-between p-3")}>
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
<View style={tw("flex flex-row-reverse mb-2")}> <View style={tw("flex flex-row-reverse mb-2")}>
{order.items.length < 2 {order.items.length < 2
? order?.items?.map((item, index) => ( ? order?.items?.map((item, index) => (
@ -139,7 +139,7 @@ function Order({ order, mobile }) {
</Text> </Text>
</View> </View>
</View> </View>
<View style={tw("flex flex-col items-center mr-4")}> <View style={tw("flex items-center mr-4")}>
<Text <Text
style={[ style={[
tw("my-3"), tw("my-3"),

@ -67,7 +67,7 @@ function Book({
)[0]; )[0];
return ( return (
<ScrollView style={[tw("flex flex-col flex-1 relative")]}> <ScrollView style={[tw("flex flex-1 relative")]}>
{!mobile && <View style={tw("mt-5")}></View>} {!mobile && <View style={tw("mt-5")}></View>}
{pageLoading && ( {pageLoading && (
<Pressable <Pressable
@ -97,13 +97,13 @@ function Book({
<View <View
style={[ style={[
tw("flex flex-col flex-1 justify-between items-end"), tw("flex flex-1 justify-between items-end"),
{ {
paddingRight: 10, paddingRight: 10,
}, },
]} ]}
> >
<View style={tw("flex flex-col items-end")}> <View style={tw("flex items-end")}>
<Text <Text
style={{ style={{
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[colorScheme].green79,
@ -192,7 +192,7 @@ function Book({
</Text> </Text>
</View> </View>
</View> </View>
<View style={"flex flex-col mt-8"}> <View style={"flex mt-8"}>
<Text <Text
style={[ style={[
tw("w-full text-right"), tw("w-full text-right"),

@ -23,7 +23,7 @@ const Comment = ({ comment }) => {
return ( return (
<View <View
style={[ style={[
tw("flex flex-col rounded-md p-4 ml-2"), tw("flex rounded-md p-4 ml-2"),
{ width: width / 1.3, borderWidth: 1, borderColor: "#7070701a" }, { width: width / 1.3, borderWidth: 1, borderColor: "#7070701a" },
]} ]}
> >

@ -11,7 +11,7 @@ export default function Description({ description }) {
return ( return (
<View <View
style={[ style={[
tw("w-full flex flex-col pt-6 mt-2 mb-3"), tw("w-full flex pt-6 mt-2 mb-3"),
{ borderTopWidth: 1, borderColor: "#86A0B944" }, { borderTopWidth: 1, borderColor: "#86A0B944" },
]} ]}
> >

@ -10,7 +10,7 @@ export default function Rates({ rates }) {
<View style={tw("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<View <View
style={[ style={[
tw("flex flex-col items-center justify-center"), tw("flex items-center justify-center"),
{ width: "25%" }, { width: "25%" },
]} ]}
> >
@ -31,7 +31,7 @@ export default function Rates({ rates }) {
{"از" + " " + rates.allRates + " " + "نفر"} {"از" + " " + rates.allRates + " " + "نفر"}
</Text> </Text>
</View> </View>
<View style={[tw("flex flex-col flex-1"), { width: "60%" }]}> <View style={[tw("flex flex-1"), { width: "60%" }]}>
{rates.fields.map((field, index) => ( {rates.fields.map((field, index) => (
<Progress key={index} data={field} /> <Progress key={index} data={field} />
))} ))}

@ -13,7 +13,7 @@ import Select from "../../../components/Select";
const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => { const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
return ( return (
<View style={tw("flex flex-col px-4 h-32 bg-white")}> <View style={tw("flex px-4 h-32 bg-white")}>
<Search <Search
onChange={(val) => setFilterOptions({ ...filterOptions, search: val })} onChange={(val) => setFilterOptions({ ...filterOptions, search: val })}
placeholder={"نام کتاب یا دوره را جستجو کنید"} placeholder={"نام کتاب یا دوره را جستجو کنید"}

@ -79,7 +79,7 @@ const Main = ({ books, filterOptions, grades, mobile }) => {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[colorScheme].grayE3,
}, },
tw(`flex flex-col mb-5 p-2 rounded-md ${mobile ? "w-full" : ""}`), tw(`flex mb-5 p-2 rounded-md ${mobile ? "w-full" : ""}`),
]} ]}
key={index} key={index}
onPress={() => navigation.navigate("Video", { id: product.id })} onPress={() => navigation.navigate("Video", { id: product.id })}

@ -203,7 +203,7 @@ const List = ({ mobile }) => {
return ( return (
<View <View
style={tw( style={tw(
`w-full flex-col ${mobile ? "mt-8" : "mt-12"} ${ios ? "items-end" : ""}` `w-full ${mobile ? "mt-8" : "mt-12"} ${ios ? "items-end" : ""}`
)} )}
> >
{pages.map((page, index) => ( {pages.map((page, index) => (

@ -69,7 +69,7 @@ const ProfileAddress = ({
: update({ userAddressId: address.id, userId }) : update({ userAddressId: address.id, userId })
} }
> >
<View style={tw("flex flex-1 flex-col mr-2")}> <View style={tw("flex flex-1 mr-2")}>
{active && ( {active && (
<View <View
style={tw("w-full flex flex-row-reverse justify-between mb-3")} style={tw("w-full flex flex-row-reverse justify-between mb-3")}
@ -108,10 +108,10 @@ const ProfileAddress = ({
)} )}
<View <View
style={tw( style={tw(
`flex w-full ${active ? "flex-col" : "flex-row-reverse"}` `flex w-full ${active ? "" : "flex-row-reverse"}`
)} )}
> >
<View style={tw("flex flex-col flex-1 mb-4")}> <View style={tw("flex flex-1 mb-4")}>
<Text <Text
style={[ style={[
{ {
@ -229,7 +229,7 @@ const ProfileAddress = ({
onLayout={() => setHeight(Dimensions.get("window").height)} onLayout={() => setHeight(Dimensions.get("window").height)}
> >
<View style={tw("w-full mt-2 px-4")}> <View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex flex-col")}> <View style={tw("p-0 m-0 flex ")}>
{addresses.map((address, index) => ( {addresses.map((address, index) => (
<Location <Location
address={address} address={address}

@ -56,7 +56,7 @@ const ProfileBookmark = ({ bookmarkList }) => {
minHeight: (80 * 4) / 2.7, minHeight: (80 * 4) / 2.7,
}} }}
/> />
<View style={tw(`flex flex-col mr-2 ${ios ? "items-end" : ""}`)}> <View style={tw(`flex mr-2 ${ios ? "items-end" : ""}`)}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
@ -126,7 +126,7 @@ const ProfileBookmark = ({ bookmarkList }) => {
style={styles.container} style={styles.container}
> >
<View style={tw("w-full mt-2 px-4")}> <View style={tw("w-full mt-2 px-4")}>
<View style={tw("p-0 m-0 flex flex-col")}> <View style={tw("p-0 m-0 flex ")}>
{bookmarkList.map((bookmark, index) => ( {bookmarkList.map((bookmark, index) => (
<Bookmark key={index} bookmark={bookmark} /> <Bookmark key={index} bookmark={bookmark} />
))} ))}

@ -21,7 +21,7 @@ const User = ({ user, mobile }) => {
const colorScheme = Appearance.getColorScheme(); const colorScheme = Appearance.getColorScheme();
const [dropdown, setDropdown] = React.useState(true); const [dropdown, setDropdown] = React.useState(true);
return ( return (
<View style={tw(`w-full flex-col ${ios ? "items-end" : ""}`)}> <View style={tw(`w-full ${ios ? "items-end" : ""}`)}>
<Pressable <Pressable
style={tw( style={tw(
`w-full mt-2 mb-2 flex flex-row-reverse justify-between items-center` `w-full mt-2 mb-2 flex flex-row-reverse justify-between items-center`
@ -50,7 +50,7 @@ const User = ({ user, mobile }) => {
]} ]}
></View> ></View>
)} )}
<View style={tw(`flex flex-col mr-1 ${ios ? "items-end" : ""}`)}> <View style={tw(`flex mr-1 ${ios ? "items-end" : ""}`)}>
<Text <Text
style={{ style={{
fontSize: mobile ? fontSize.lg : fontSize.xl5, fontSize: mobile ? fontSize.lg : fontSize.xl5,
@ -88,7 +88,7 @@ const User = ({ user, mobile }) => {
{dropdown && ( {dropdown && (
<View <View
style={tw( style={tw(
`flex flex-col w-full pr-16 ${ios ? "items-end" : " "} ${ `flex w-full pr-16 ${ios ? "items-end" : " "} ${
mobile ? "mt-0" : "mt-4" mobile ? "mt-0" : "mt-4"
}` }`
)} )}

@ -53,7 +53,7 @@ export default function Scan({}) {
> >
<View <View
style={tw( style={tw(
"flex-1 flex flex-col justify-evenly items-center bg-gray-800 bg-opacity-80" "flex-1 flex justify-evenly items-center bg-gray-800 bg-opacity-80"
)} )}
> >
<View style={{ width: height / 2.5, height: height / 2.5 }}> <View style={{ width: height / 2.5, height: height / 2.5 }}>

@ -12,7 +12,7 @@ export default function Links({ links }) {
"w-full flex-row-reverse justify-between items-center rounded-md bg-yellow-100 py-3 px-2 mt-5" "w-full flex-row-reverse justify-between items-center rounded-md bg-yellow-100 py-3 px-2 mt-5"
)} )}
> >
<View style={tw("flex flex-col items-end")}> <View style={tw("flex items-end")}>
<Text style={{ fontSize: width / 31, fontFamily: "bold" }}> <Text style={{ fontSize: width / 31, fontFamily: "bold" }}>
لینک ها لینک ها
</Text> </Text>

@ -9,7 +9,7 @@ export default function VideoContent({ data }) {
const [status, setStatus] = React.useState({}); const [status, setStatus] = React.useState({});
const video = React.useRef(null); const video = React.useRef(null);
return ( return (
<View style={tw("w-full flex-col mt-5")}> <View style={tw("w-full mt-5")}>
<Text <Text
style={[ style={[
tw("w-full text-right text-green-900 mb-4"), tw("w-full text-right text-green-900 mb-4"),
@ -18,7 +18,7 @@ export default function VideoContent({ data }) {
> >
{'موضوع:' + ' ' + data.name} {'موضوع:' + ' ' + data.name}
</Text> </Text>
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
<Video <Video
ref={video} ref={video}
style={{ width: "100%", height: (width * 9) / 16 - 16 }} style={{ width: "100%", height: (width * 9) / 16 - 16 }}

@ -7,7 +7,7 @@ const { width } = Dimensions.get("window");
export default function Voice({ data }) { export default function Voice({ data }) {
return ( return (
<View style={tw("w-full flex-col rounded-md bg-green-200 py-3 px-2 mt-4")}> <View style={tw("w-full rounded-md bg-green-200 py-3 px-2 mt-4")}>
<Text <Text
style={[ style={[
tw("w-full text-right text-xs text-green-900"), tw("w-full text-right text-xs text-green-900"),

@ -8,15 +8,15 @@ const { width} = Dimensions.get("window");
export default function Content({ data, grades }) { export default function Content({ data, grades }) {
return ( return (
<View style={tw("flex-1 flex flex-col px-4 pb-20")}> <View style={tw("flex-1 flex px-4 pb-20")}>
<View style={tw("flex flex-1 flex-col")}> <View style={tw("flex flex-1 ")}>
<View style={tw("flex w-full flex-row-reverse justify-between")}> <View style={tw("flex w-full flex-row-reverse justify-between")}>
<View style={tw("flex flex-row-reverse")}> <View style={tw("flex flex-row-reverse")}>
<Image <Image
source={{ uri: "https://dnvn.ir/api/v1/file/2105" }} source={{ uri: "https://dnvn.ir/api/v1/file/2105" }}
style={[{ width: 80, height: 120 }, tw("rounded-md")]} style={[{ width: 80, height: 120 }, tw("rounded-md")]}
/> />
<View style={tw("flex flex-col items-end mr-3")}> <View style={tw("flex items-end mr-3")}>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",

@ -18,7 +18,7 @@ export default function Tab({ data }) {
return ( return (
<View <View
style={[ style={[
tw("w-full flex flex-col rounded-md overflow-hidden mt-4"), tw("w-full flex rounded-md overflow-hidden mt-4"),
{ borderWidth: 1, borderColor: Colors.theme1.light.blue5 }, { borderWidth: 1, borderColor: Colors.theme1.light.blue5 },
]} ]}
> >
@ -185,7 +185,7 @@ export default function Tab({ data }) {
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={tw("flex flex-col w-full p-4")}> <View style={tw("flex w-full p-4")}>
{dataType === "all" && ( {dataType === "all" && (
<> <>
{data.voice && ( {data.voice && (

@ -27,7 +27,7 @@ function Code({ codeId, setCodeId, userId, factorId }) {
return ( return (
<KeyboardAvoidingView <KeyboardAvoidingView
enabled enabled
style={tw("flex w-full flex-col items-end mt-5 overflow-hidden")} style={tw("flex w-full items-end mt-5 overflow-hidden")}
> >
<View <View
style={[ style={[

@ -52,7 +52,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) {
/> />
<View <View
style={tw( style={tw(
`flex flex-col ${ios ? "items-start pl-3" : "items-end pr-2"}` `flex ${ios ? "items-start pl-3" : "items-end pr-2"}`
)} )}
> >
<Text <Text
@ -116,7 +116,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) {
</View> </View>
<View <View
style={tw( style={tw(
`flex flex-col justify-between ${ios ? "items-end" : "items-start"}` `flex justify-between ${ios ? "items-end" : "items-start"}`
)} )}
> >
<AntDesign <AntDesign
@ -135,7 +135,7 @@ function Product({ product, grades, pushToCart, loading, mobile }) {
) )
} }
/> />
<View style={tw("flex flex-col items-center mt-2")}> <View style={tw("flex items-center mt-2")}>
<View <View
style={tw( style={tw(
`flex items-center mb-3 ${ios ? "flex-row" : "flex-row-reverse"}` `flex items-center mb-3 ${ios ? "flex-row" : "flex-row-reverse"}`

@ -150,7 +150,7 @@ function ShoppingCart({
<Code /> <Code />
<View <View
style={tw( style={tw(
"flex flex-col w-full border-t py-2 border-gray-300 border-b mt-6" "flex w-full border-t py-2 border-gray-300 border-b mt-6"
)} )}
> >
<PriceStatus <PriceStatus

@ -35,7 +35,7 @@ const Season = ({
return ( return (
<View <View
style={[ style={[
tw("w-full flex flex-col overflow-hidden mb-3"), tw("w-full flex overflow-hidden mb-3"),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1[colorScheme].grayE3, borderColor: Colors.theme1[colorScheme].grayE3,
@ -114,10 +114,10 @@ const Season = ({
); );
}; };
return ( return (
<View style={tw("w-full flex flex-col mb-4")}> <View style={tw("w-full flex mb-4")}>
<Pressable <Pressable
style={[ style={[
tw("flex flex-col rounded-sm py-3 px-3"), tw("flex rounded-sm py-3 px-3"),
{ {
backgroundColor: Colors.theme1[colorScheme].greenCF + "05", backgroundColor: Colors.theme1[colorScheme].greenCF + "05",
borderWidth: 1, borderWidth: 1,

@ -77,7 +77,7 @@ function Product({
style={styles.container} style={styles.container}
> >
{!mobile && <View style={tw("mt-5")}></View>} {!mobile && <View style={tw("mt-5")}></View>}
<View style={[tw(" w-full flex flex-col")]}> <View style={[tw(" w-full flex ")]}>
<View <View
style={[ style={[
tw( tw(
@ -93,7 +93,7 @@ function Product({
{ height: mobile ? width / 3 * 4 / 2.6 : 300, width: mobile ? width / 3 : 210 }, { height: mobile ? width / 3 * 4 / 2.6 : 300, width: mobile ? width / 3 : 210 },
]} ]}
/> />
<View style={tw("flex flex-col items-end flex-1")}> <View style={tw("flex items-end flex-1")}>
<Text <Text
style={{ style={{
marginTop: 5, marginTop: 5,
@ -119,7 +119,7 @@ function Product({
</View> </View>
<View <View
style={[ style={[
tw("flex flex-col flex-1 justify-between"), tw("flex flex-1 justify-between"),
{ {
paddingRight: 10, paddingRight: 10,
}, },
@ -143,7 +143,7 @@ function Product({
} }
/> />
</View> </View>
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
{seasons {seasons
?.sort((a, b) => a[0]?.categoryId - b[0]?.categoryId) ?.sort((a, b) => a[0]?.categoryId - b[0]?.categoryId)
?.map((season, index) => ( ?.map((season, index) => (

@ -38,7 +38,7 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile }) => {
return ( return (
<View <View
style={[ style={[
tw(`w-full flex flex-col rounded-md overflow-hidden ${mobile ? "mb-3" : "mb-5"}`), tw(`w-full flex rounded-md overflow-hidden ${mobile ? "mb-3" : "mb-5"}`),
{ {
borderWidth: 1, borderWidth: 1,
borderColor: Colors.theme1[colorScheme].greenD9, borderColor: Colors.theme1[colorScheme].greenD9,
@ -120,7 +120,7 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile }) => {
); );
}; };
return ( return (
<View style={tw("w-full flex flex-col")}> <View style={tw("w-full flex ")}>
{season.map((unit, index) => ( {season.map((unit, index) => (
<Unit unit={unit} key={index} /> <Unit unit={unit} key={index} />
))} ))}

@ -79,7 +79,7 @@ function VideoDisplay({ route, mobile }) {
> >
{!mobile && <View style={tw("mt-5")}></View>} {!mobile && <View style={tw("mt-5")}></View>}
<View style={tw("flex flex-col")}> <View style={tw("flex ")}>
<Video <Video
ref={video} ref={video}
style={{ width: "100%", height: (width * 9) / 16 - 16 }} style={{ width: "100%", height: (width * 9) / 16 - 16 }}
@ -105,7 +105,7 @@ function VideoDisplay({ route, mobile }) {
</Text> </Text>
<View <View
style={[ style={[
tw("flex flex-col flex-1 justify-between"), tw("flex flex-1 justify-between"),
{ {
paddingRight: 10, paddingRight: 10,
}, },

@ -30,7 +30,7 @@ function MostViewedVideo({ videos, grades, mobile }) {
{ {
width: mobile ? width / 1.5 : width / 2.2, width: mobile ? width / 1.5 : width / 2.2,
}, },
tw("flex flex-col items-end rounded-md ml-6"), tw("flex items-end rounded-md ml-6"),
]} ]}
onPress={() => navigation.navigate("Video", { id: video.id })} onPress={() => navigation.navigate("Video", { id: video.id })}
> >
@ -122,7 +122,7 @@ function MostViewedVideo({ videos, grades, mobile }) {
); );
}; };
return ( return (
<View style={tw("w-full flex flex-col w-full mt-3")}> <View style={tw("w-full flex w-full mt-3")}>
<Header title="پربازدیدترین" /> <Header title="پربازدیدترین" />
<FlatList <FlatList
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}

@ -32,7 +32,7 @@ const NewestVideo = ({ videos, grades, mobile }) => {
{ {
width: mobile ? width / 2.3 : width / 3.3, width: mobile ? width / 2.3 : width / 3.3,
}, },
tw("flex flex-col items-end mb-4"), tw("flex items-end mb-4"),
]} ]}
onPress={() => navigation.navigate("Video", { id: video.id })} onPress={() => navigation.navigate("Video", { id: video.id })}
> >
@ -70,7 +70,7 @@ const NewestVideo = ({ videos, grades, mobile }) => {
); );
}; };
return ( return (
<View style={tw("w-full flex flex-col w-full")}> <View style={tw("w-full flex w-full")}>
<Header title="جدیدترین دورهها" route="" /> <Header title="جدیدترین دورهها" route="" />
<View <View
style={tw( style={tw(

@ -21,7 +21,7 @@ const VerticalGradeFilter = ({ grades }) => {
); );
}; };
return ( return (
<View style={tw("w-full flex flex-col mt-3")}> <View style={tw("w-full flex mt-3")}>
<Header title={"پایه تحصیلی"} /> <Header title={"پایه تحصیلی"} />
<FlatList <FlatList
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}

Loading…
Cancel
Save