reza fixed ar

master
Reza_ashrafi 3 years ago
parent ab71241656
commit a2a96d5caf
  1. 4
      src/screens/AR/components/Book.js
  2. 10
      src/screens/Blog/index.js
  3. 19
      src/screens/Home/components/MyBooks.js
  4. 62
      src/screens/Profile/components/List.js

@ -25,7 +25,7 @@ const Book = ({ book, mobile, theme }) => {
style={[ style={[
tw("rounded-sm w-full"), tw("rounded-sm w-full"),
{ {
height: mobile ? (((width - 32) / 2) * 3) / 3.5 : 200, height: mobile ? (width - 32) / 1.5 : 200,
flex: 1, flex: 1,
}, },
]} ]}
@ -34,7 +34,7 @@ const Book = ({ book, mobile, theme }) => {
style={[ style={[
{ {
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.tiny, fontSize: fontSize.lg,
marginTop: 10, marginTop: 10,
color: color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white, theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,

@ -161,13 +161,15 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
</View> </View>
</LinearGradient> </LinearGradient>
</View> </View>
<View style={[tw("flex my-5"), { textAlign: "right" }]}> <View
style={[tw("flex my-5"), { textAlign: "right", marginBottom: 50 }]}
>
<Text <Text
style={{ style={{
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.base, fontSize: fontSize.base,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
marginBottom: 20, marginBottom: 60,
color: color:
theme === "light" theme === "light"
? Colors.theme1.gray20 ? Colors.theme1.gray20
@ -195,6 +197,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
textAlign: "right", textAlign: "right",
fontFamily: "light", fontFamily: "light",
lineHeight: 25, lineHeight: 25,
marginVertical: -35,
}, },
strong: { strong: {
color: color:
@ -202,11 +205,12 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
? Colors.theme1.gray20 ? Colors.theme1.gray20
: Colors.theme1.grayF9, : Colors.theme1.grayF9,
textAlign: "right", textAlign: "right",
fontFamily: "light", fontFamily: "bold",
lineHeight: 25, lineHeight: 25,
}, },
ul: { ul: {
textAlign: "right", textAlign: "right",
marginVertical: -35,
}, },
li: { li: {
color: color:

@ -1,4 +1,12 @@
import { View, Text, Image, Pressable, FlatList, Platform } from "react-native"; import {
View,
Text,
Image,
Pressable,
FlatList,
Platform,
Linking,
} from "react-native";
import { connect } from "react-redux"; import { connect } from "react-redux";
//components //components
@ -59,10 +67,17 @@ function MyBooks({ books, grades, theme }) {
} }
const Book = ({ book, grades, theme }) => { const Book = ({ book, grades, theme }) => {
const actions = {
3: () =>
Linking.openURL(`https://ar.dnvn.ir/lunch?id=${book.product.book.id}`),
2: () =>
Linking.openURL(`https://ar.dnvn.ir/lunch?id=${book.product.book.id}`),
4: () => {},
};
return ( return (
<Pressable <Pressable
style={tw(`flex mr-4 ${ios ? "items-end" : ""}`)} style={tw(`flex mr-4 ${ios ? "items-end" : ""}`)}
onPress={() => {}} onPress={actions[book.productType]}
> >
<View style={{ height: 165 }}> <View style={{ height: 165 }}>
<Image <Image

@ -29,7 +29,9 @@ const List = ({ mobile, theme }) => {
<Path <Path
d="M17 7a5 5 0 1 1-5-5 5 5 0 0 1 5 5Z" d="M17 7a5 5 0 1 1-5-5 5 5 0 0 1 5 5Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -38,7 +40,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7" d="M20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -54,7 +58,9 @@ const List = ({ mobile, theme }) => {
<Path <Path
d="M7.5 7.67V6.7a4.773 4.773 0 0 1 4.06-4.67 4.5 4.5 0 0 1 4.94 4.478v1.38" d="M7.5 7.67V6.7a4.773 4.773 0 0 1 4.06-4.67 4.5 4.5 0 0 1 4.94 4.478v1.38"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -63,7 +69,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M9 22h6c4.02 0 4.74-1.61 4.95-3.57l.75-6C20.97 9.99 20.27 8 16 8H8c-4.27 0-4.97 1.99-4.7 4.43l.75 6C4.26 20.39 4.98 22 9 22Z" d="M9 22h6c4.02 0 4.74-1.61 4.95-3.57l.75-6C20.97 9.99 20.27 8 16 8H8c-4.27 0-4.97 1.99-4.7 4.43l.75 6C4.26 20.39 4.98 22 9 22Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -72,7 +80,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M15.496 12h.005M8.495 12H8.5" d="M15.496 12h.005M8.495 12H8.5"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={2} strokeWidth={2}
@ -88,7 +98,9 @@ const List = ({ mobile, theme }) => {
<Path <Path
d="M22 16.548V4.642a1.959 1.959 0 0 0-2.17-1.963h-.06a19.029 19.029 0 0 0-7.07 2.338l-.17.109a1.121 1.121 0 0 1-1.06 0l-.25-.148a18.935 18.935 0 0 0-7.06-2.309A1.957 1.957 0 0 0 2 4.632v11.916a2.036 2.036 0 0 0 1.74 1.953l.29.039a25.941 25.941 0 0 1 7.44 2.407l.04.02a1.094 1.094 0 0 0 .96 0 25.705 25.705 0 0 1 7.46-2.427l.33-.039A2.036 2.036 0 0 0 22 16.548Z" d="M22 16.548V4.642a1.959 1.959 0 0 0-2.17-1.963h-.06a19.029 19.029 0 0 0-7.07 2.338l-.17.109a1.121 1.121 0 0 1-1.06 0l-.25-.148a18.935 18.935 0 0 0-7.06-2.309A1.957 1.957 0 0 0 2 4.632v11.916a2.036 2.036 0 0 0 1.74 1.953l.29.039a25.941 25.941 0 0 1 7.44 2.407l.04.02a1.094 1.094 0 0 0 .96 0 25.705 25.705 0 0 1 7.46-2.427l.33-.039A2.036 2.036 0 0 0 22 16.548Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -97,7 +109,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M12 5.236v15M19.955 8.4h-2.25M19.918 11.369h-3" d="M12 5.236v15M19.955 8.4h-2.25M19.918 11.369h-3"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -114,7 +128,9 @@ const List = ({ mobile, theme }) => {
<Path <Path
d="M18.085 20.769H6.528c-3.467 0-5.778-2-5.778-6.673V7.423C.75 2.75 3.061.75 6.528.75h11.557c3.467 0 5.778 2 5.778 6.673v6.673c0 4.671-2.313 6.673-5.778 6.673Z" d="M18.085 20.769H6.528c-3.467 0-5.778-2-5.778-6.673V7.423C.75 2.75 3.061.75 6.528.75h11.557c3.467 0 5.778 2 5.778 6.673v6.673c0 4.671-2.313 6.673-5.778 6.673Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -124,7 +140,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M8.954 10.76V9.296c0-1.878 1.329-2.646 2.951-1.708l1.268.732 1.268.732c1.622.939 1.622 2.476 0 3.415l-1.267.732-1.268.732c-1.623.938-2.952.17-2.952-1.708V10.76Z" d="M8.954 10.76V9.296c0-1.878 1.329-2.646 2.951-1.708l1.268.732 1.268.732c1.622.939 1.622 2.476 0 3.415l-1.267.732-1.268.732c-1.623.938-2.952.17-2.952-1.708V10.76Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -141,7 +159,9 @@ const List = ({ mobile, theme }) => {
<Path <Path
d="M15.407 11.316h-5.313" d="M15.407 11.316h-5.313"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -150,7 +170,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M12.75 8.723v5.313M17.872 2.125H7.628a4.111 4.111 0 0 0-4.1 4.1v14.972c0 1.912 1.371 2.72 3.049 1.8l5.185-2.879a2.251 2.251 0 0 1 1.987 0l5.185 2.879c1.679.935 3.049.128 3.049-1.8V6.225a4.127 4.127 0 0 0-4.111-4.1Z" d="M12.75 8.723v5.313M17.872 2.125H7.628a4.111 4.111 0 0 0-4.1 4.1v14.972c0 1.912 1.371 2.72 3.049 1.8l5.185-2.879a2.251 2.251 0 0 1 1.987 0l5.185 2.879c1.679.935 3.049.128 3.049-1.8V6.225a4.127 4.127 0 0 0-4.111-4.1Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -165,7 +187,9 @@ const List = ({ mobile, theme }) => {
<Svg xmlns="http://www.w3.org/2000/svg" width={24} height={24}> <Svg xmlns="http://www.w3.org/2000/svg" width={24} height={24}>
<G <G
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -184,7 +208,9 @@ const List = ({ mobile, theme }) => {
data-name="Vector" data-name="Vector"
d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z"
fill="none" fill="none"
stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} stroke={
theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white
}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={1.5} strokeWidth={1.5}
@ -211,7 +237,8 @@ const List = ({ mobile, theme }) => {
), ),
{ {
borderBottomWidth: 1, borderBottomWidth: 1,
borderColor: Colors.theme1.grayE3 + (theme === 'light' ? "aa" : '55'), borderColor:
Colors.theme1.grayE3 + (theme === "light" ? "aa" : "55"),
}, },
]} ]}
onPress={() => page.onPress()} onPress={() => page.onPress()}
@ -223,7 +250,10 @@ const List = ({ mobile, theme }) => {
fontFamily: "regular", fontFamily: "regular",
marginTop: 5, marginTop: 5,
marginRight: mobile ? 10 : 20, marginRight: mobile ? 10 : 20,
color: theme === 'light' ? Colors.theme1.gray20 : Colors.theme1.white, color:
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontSize: mobile ? fontSize.tiny : fontSize.lg, fontSize: mobile ? fontSize.tiny : fontSize.lg,
}} }}
> >
@ -248,7 +278,7 @@ const List = ({ mobile, theme }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme theme: state.publicApi.theme,
}); });
export default connect(mapStateToProps)(List); export default connect(mapStateToProps)(List);

Loading…
Cancel
Save