diff --git a/App.js b/App.js index 9b96c3b..ea92559 100644 --- a/App.js +++ b/App.js @@ -9,9 +9,9 @@ import store from './src/redux/store'; const App = () => { let [fontsLoaded] = useFonts({ - light : require("./assets/fonts/Farsi/Light.ttf"), - regular: require("./assets/fonts/Farsi/Regular.ttf"), - bold: require("./assets/fonts/Farsi/Medium.ttf"), + light : require("./assets/fonts/Farsi/Regular.ttf"), + regular: require("./assets/fonts/Farsi/Medium.ttf"), + bold: require("./assets/fonts/Farsi/DemiBold.ttf"), }); if (!fontsLoaded) { diff --git a/assets/fonts/Farsi/IRANSansXFaNum-Black.ttf b/assets/fonts/Farsi/Black.ttf similarity index 100% rename from assets/fonts/Farsi/IRANSansXFaNum-Black.ttf rename to assets/fonts/Farsi/Black.ttf diff --git a/assets/fonts/Farsi/IRANSansXFaNum-Bold.ttf b/assets/fonts/Farsi/Bold.ttf similarity index 100% rename from assets/fonts/Farsi/IRANSansXFaNum-Bold.ttf rename to assets/fonts/Farsi/Bold.ttf diff --git a/assets/fonts/Farsi/IRANSansXFaNum-DemiBold.ttf b/assets/fonts/Farsi/DemiBold.ttf similarity index 100% rename from assets/fonts/Farsi/IRANSansXFaNum-DemiBold.ttf rename to assets/fonts/Farsi/DemiBold.ttf diff --git a/navigation/index.js b/navigation/index.js index a8cce13..fd97f91 100644 --- a/navigation/index.js +++ b/navigation/index.js @@ -29,6 +29,7 @@ import Tests from "../src/screens/Tests"; import ShoppingCart from "../src/screens/ShoppingCart"; import DeliveryForm from "../src/screens/DeliveryForm"; import Address from "../src/screens/Address"; +import Profile from "../src/screens/Profile"; //style import fontSize from "../src/constants/fontSize"; @@ -61,8 +62,8 @@ const BottomTabNavigator = () => { }} > @@ -384,17 +385,15 @@ const CARTStackScreen = () => { ); } -const AuthStack = createNativeStackNavigator(); -const AuthStackScreen = () => { +const PROFILEStack = createNativeStackNavigator(); +const PROFILEStackScreen = () => { return ( - - - - - + + ); }; diff --git a/src/components/Drawer.js b/src/components/Drawer.js index 56cc65c..d87359a 100644 --- a/src/components/Drawer.js +++ b/src/components/Drawer.js @@ -164,7 +164,7 @@ const Drawer = ({ position, setBoxPosition, user }) => { @@ -173,7 +173,7 @@ const Drawer = ({ position, setBoxPosition, user }) => { diff --git a/src/components/Navbar.js b/src/components/Navbar.js index d24cd4d..467452f 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -67,7 +67,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => { style={{ fontFamily: "bold", fontSize: fontSize.xl, - color: Color.theme1.light.blue5, + color: Color.theme1[colorScheme].green79, paddingRight: 16, }} > diff --git a/src/components/Search.js b/src/components/Search.js index df32965..42a7635 100644 --- a/src/components/Search.js +++ b/src/components/Search.js @@ -29,12 +29,12 @@ const Search = ({ fontSize: fontSize.tiny, color: Colors.theme1[colorScheme].gray2077, borderWidth: 0.5, - borderColor: Colors.theme1[colorScheme].gray2077, - paddingVertical: 4, + borderColor: Colors.theme1[colorScheme].gray20, + paddingVertical: 10, paddingHorizontal: 10, direction: direction, textAlign: textAlign, - backgroundColor: Colors.theme1[colorScheme].grayF9, + backgroundColor: Colors.theme1[colorScheme].white, fontFamily : 'regular' }, }); @@ -44,11 +44,11 @@ const Search = ({ style={[styles.inputStyle, tw('rounded-md')]} onChangeText={text => onChange(text)} placeholder={placeholder} - placeholderTextColor={Colors.theme1[colorScheme].grayCC} + placeholderTextColor={Colors.theme1[colorScheme].gray2077} value={value} /> - - + + ); diff --git a/src/redux/actions/public.js b/src/redux/actions/public.js index 9ddc853..7a3e3f0 100644 --- a/src/redux/actions/public.js +++ b/src/redux/actions/public.js @@ -7,9 +7,11 @@ const publicApi = { setFaqActive: (data) => async (dispatch) => await dispatch({ type: "public/faq/activate", data: data }), bookInfo: - (data = {}) => - async (dispatch) => - await proxy.get("public/vod/bookCourse", data, { dispatch }), + (data = {}, data2 = {}) => + async (dispatch) => { + await proxy.get("public/vod/bookCourse", data, { dispatch }); + await proxy.get("book/info", data2, { dispatch }); + }, bookSection: (data = {}) => async (dispatch) => diff --git a/src/screens/Home/components/Blogs.js b/src/screens/Home/components/Blogs.js index 91e2072..e6304aa 100644 --- a/src/screens/Home/components/Blogs.js +++ b/src/screens/Home/components/Blogs.js @@ -6,7 +6,8 @@ import { Dimensions, TouchableOpacity, FlatList, - Pressable + Pressable, + Appearance } from "react-native"; import { connect } from "react-redux"; import Svg, { G, Path } from "react-native-svg"; @@ -16,7 +17,7 @@ import Header from "../components/Header"; //Style import tw from "tailwind-rn"; -import Color from "../../../constants/Colors"; +import Colors from "../../../constants/Colors"; import fontSize from "../../../constants/fontSize"; //asssets @@ -25,6 +26,7 @@ import userImage from "../assets/user.png"; const { width } = Dimensions.get("window"); function Blogs({ blogs }) { + const colorScheme = Appearance.getColorScheme(); const Blog = ({ blog }) => { return ( @@ -58,7 +61,7 @@ function Blogs({ blogs }) { style={[ tw("mb-2"), { - color: Color.theme1.light.blue7, + color: Colors.theme1[colorScheme].gray20, fontFamily: "bold", fontSize: fontSize.tiny, }, @@ -75,7 +78,7 @@ function Blogs({ blogs }) { @@ -47,7 +47,7 @@ function MyBooks({ books, grades }) { style={[ tw("mt-2 pr-1"), { - color: Color.theme1.light.blue6, + color: Colors.theme1[colorScheme].gray20, fontFamily: "bold", fontSize: fontSize.base, }, @@ -59,9 +59,9 @@ function MyBooks({ books, grades }) { style={[ tw("pr-1"), { - color: Color.theme1.light.blue5, + color: Colors.theme1[colorScheme].gray20, fontFamily: "light", - fontSize: fontSize.base, + fontSize: fontSize.tiny, }, ]} > diff --git a/src/screens/Home/components/Videos.js b/src/screens/Home/components/Videos.js index 9bf6cde..49385c5 100644 --- a/src/screens/Home/components/Videos.js +++ b/src/screens/Home/components/Videos.js @@ -1,4 +1,11 @@ -import { View, Text, Image, TouchableOpacity, FlatList } from "react-native"; +import { + View, + Text, + Image, + TouchableOpacity, + FlatList, + Appearance, +} from "react-native"; import { useNavigation } from "@react-navigation/native"; import tw from "tailwind-rn"; import { connect } from "react-redux"; @@ -8,10 +15,11 @@ import Progress from "../../../components/Progress"; import Header from "../components/Header"; //style -import Color from "../../../constants/Colors"; +import Colors from "../../../constants/Colors"; import fontSize from "../../../constants/fontSize"; function Videos({ videos, grades }) { + const colorScheme = Appearance.getColorScheme(); const Video = ({ video }) => { const navigation = useNavigation(); return ( @@ -33,9 +41,9 @@ function Videos({ videos, grades }) { style={[ tw("mt-2 pr-1"), { - color: Color.theme1.light.blue6, + color: Colors.theme1[colorScheme].gray20, fontFamily: "bold", - fontSize: fontSize.tiny, + fontSize: fontSize.base, }, ]} > @@ -45,9 +53,9 @@ function Videos({ videos, grades }) { style={[ tw("mt-1 pr-1"), { - color: Color.theme1.light.blue5, + color: Colors.theme1[colorScheme].gray20, fontFamily: "light", - fontSize: fontSize.sm, + fontSize: fontSize.tiny, }, ]} > diff --git a/src/screens/Products/components/Header.js b/src/screens/Products/components/Header.js index c5fd312..2768623 100644 --- a/src/screens/Products/components/Header.js +++ b/src/screens/Products/components/Header.js @@ -13,13 +13,13 @@ import Select from "../../../components/Select"; const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => { return ( - + setFilterOptions({ ...filterOptions, search: val })} placeholder={"نام کتاب یا دوره را جستجو کنید"} />