diff --git a/src/screens/AR/components/Book.js b/src/screens/AR/components/Book.js index 94cd025..9003b75 100644 --- a/src/screens/AR/components/Book.js +++ b/src/screens/AR/components/Book.js @@ -25,7 +25,7 @@ const Book = ({ book, mobile, theme }) => { style={[ tw("rounded-sm w-full"), { - height: mobile ? (((width - 32) / 2) * 3) / 3.5 : 200, + height: mobile ? (width - 32) / 1.5 : 200, flex: 1, }, ]} @@ -34,7 +34,7 @@ const Book = ({ book, mobile, theme }) => { style={[ { fontFamily: "bold", - fontSize: fontSize.tiny, + fontSize: fontSize.lg, marginTop: 10, color: theme === "light" ? Colors.theme1.green79 : Colors.theme1.white, diff --git a/src/screens/Blog/index.js b/src/screens/Blog/index.js index 24eee2d..1413a40 100644 --- a/src/screens/Blog/index.js +++ b/src/screens/Blog/index.js @@ -161,13 +161,15 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => { - + { textAlign: "right", fontFamily: "light", lineHeight: 25, + marginVertical: -35, }, strong: { color: @@ -202,11 +205,12 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => { ? Colors.theme1.gray20 : Colors.theme1.grayF9, textAlign: "right", - fontFamily: "light", + fontFamily: "bold", lineHeight: 25, }, ul: { textAlign: "right", + marginVertical: -35, }, li: { color: diff --git a/src/screens/Home/components/MyBooks.js b/src/screens/Home/components/MyBooks.js index d8ef8cc..b5250b9 100644 --- a/src/screens/Home/components/MyBooks.js +++ b/src/screens/Home/components/MyBooks.js @@ -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"; //components @@ -59,10 +67,17 @@ function MyBooks({ books, 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 ( {}} + onPress={actions[book.productType]} > { { data-name="Vector" d="M20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -54,7 +58,9 @@ const List = ({ mobile, theme }) => { { 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" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -72,7 +80,9 @@ const List = ({ mobile, theme }) => { data-name="Vector" d="M15.496 12h.005M8.495 12H8.5" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} @@ -88,7 +98,9 @@ const List = ({ mobile, theme }) => { { data-name="Vector" d="M12 5.236v15M19.955 8.4h-2.25M19.918 11.369h-3" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -114,7 +128,9 @@ const List = ({ mobile, theme }) => { { 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" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -141,7 +159,9 @@ const List = ({ mobile, theme }) => { { 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" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -165,7 +187,9 @@ const List = ({ mobile, theme }) => { { 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" fill="none" - stroke={theme === 'light' ? Colors.theme1.greenCF : Colors.theme1.white} + stroke={ + theme === "light" ? Colors.theme1.greenCF : Colors.theme1.white + } strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} @@ -211,7 +237,8 @@ const List = ({ mobile, theme }) => { ), { borderBottomWidth: 1, - borderColor: Colors.theme1.grayE3 + (theme === 'light' ? "aa" : '55'), + borderColor: + Colors.theme1.grayE3 + (theme === "light" ? "aa" : "55"), }, ]} onPress={() => page.onPress()} @@ -223,7 +250,10 @@ const List = ({ mobile, theme }) => { fontFamily: "regular", marginTop: 5, 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, }} > @@ -248,7 +278,7 @@ const List = ({ mobile, theme }) => { const mapStateToProps = (state) => ({ mobile: state.publicApi.mobile, - theme: state.publicApi.theme + theme: state.publicApi.theme, }); export default connect(mapStateToProps)(List);