From 5c61fe6ff924a2ccaeff8bdd8021b016047ae792 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Mon, 2 May 2022 21:23:02 +0430 Subject: [PATCH] reza fixed something --- src/components/Navbar.js | 6 +++- src/redux/reducers/public.js | 2 +- src/screens/Activation/index.js | 4 +-- src/screens/Address/index.js | 2 +- .../Profile/components/MyCourses/index.js | 2 +- src/screens/Profile/components/Trophy.js | 12 +++++-- src/screens/Profile/components/User.js | 3 +- src/screens/Profile/index.js | 2 +- .../VideoDisplay/components/Season/index.js | 35 ++++++++++++++----- src/screens/VideoDisplay/index.js | 2 +- src/screens/Videos/index.js | 4 +-- 11 files changed, 53 insertions(+), 21 deletions(-) diff --git a/src/components/Navbar.js b/src/components/Navbar.js index bd503f7..632f2dc 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -477,7 +477,11 @@ const Navbar = ({ ) ) : null} {headerOptions?.menu ? ( - + ) : null} diff --git a/src/redux/reducers/public.js b/src/redux/reducers/public.js index a25a13a..54b1774 100644 --- a/src/redux/reducers/public.js +++ b/src/redux/reducers/public.js @@ -18,7 +18,7 @@ const initialState = { provinces: [], cities: [], province: ["استان"], - city: ["شهر"], + city: ["شهرستان"], departmans: [ { id: 0, diff --git a/src/screens/Activation/index.js b/src/screens/Activation/index.js index 2ccd22e..e2597d1 100644 --- a/src/screens/Activation/index.js +++ b/src/screens/Activation/index.js @@ -36,7 +36,7 @@ const ios = Platform.OS === "ios"; const { height } = Dimensions.get("window"); function Activation({ add, mobile, theme, route }) { - const [value, setValue] = useState(null); + const [value, setValue] = useState(route?.params?.data || ""); const navigation = useNavigation(); const insets = useSafeAreaInsets(); @@ -113,7 +113,7 @@ function Activation({ add, mobile, theme, route }) { : Colors.theme1.white, }, ]} - value={value || route?.params?.data} + value={value} onChangeText={(value) => setValue( (value = onInput.englishAndNumberWithoutSpace(value)) diff --git a/src/screens/Address/index.js b/src/screens/Address/index.js index bfeb268..a1d2976 100644 --- a/src/screens/Address/index.js +++ b/src/screens/Address/index.js @@ -410,7 +410,7 @@ const Address = ({ : city[0] } onChange={(name, value) => - value === "شهر" ? {} : onChange(name, value) + value === "شهرستان" ? {} : onChange(name, value) } options={city} width={"100%"} diff --git a/src/screens/Profile/components/MyCourses/index.js b/src/screens/Profile/components/MyCourses/index.js index 3b4729a..0a58ee4 100644 --- a/src/screens/Profile/components/MyCourses/index.js +++ b/src/screens/Profile/components/MyCourses/index.js @@ -63,7 +63,7 @@ const ProfileBookmark = ({ myCourses = [], mobile, theme }) => { navigation.push("Products")} + buttonAction={() => navigation.navigate("VOD")} /> )} diff --git a/src/screens/Profile/components/Trophy.js b/src/screens/Profile/components/Trophy.js index 0ecb160..9f12062 100644 --- a/src/screens/Profile/components/Trophy.js +++ b/src/screens/Profile/components/Trophy.js @@ -2,6 +2,7 @@ import { View, Text, Platform, Pressable } from "react-native"; import React from "react"; import { connect } from "react-redux"; import Svg, { G, Path } from "react-native-svg"; +import {asyncAwesomeAlert} from "../../../utils/AsyncWrappers"; //style import tw from "tailwind-rn"; @@ -61,10 +62,17 @@ const Trophy = ({ theme }) => { theme === "light" ? Colors.theme1.green79 : Colors.theme1.yellow2, }} > - {"امتیاز شما" + " " + 14560} + {"امتیاز شما" + " " + 0} - + + asyncAwesomeAlert("نتیجه", "این قابلیت در حال توسعه است.", { + confirmText : 'باشه', + showCancelButton: false, + }) + } + > { - asyncAwesomeAlert("نتیجه", "این قابلیت در حال توسعه است.", { + asyncAwesomeAlert("", "این قابلیت در حال توسعه است.", { + confirmText : 'باشه', showCancelButton: false, }) } diff --git a/src/screens/Profile/index.js b/src/screens/Profile/index.js index 420d39f..0a6a14d 100644 --- a/src/screens/Profile/index.js +++ b/src/screens/Profile/index.js @@ -65,7 +65,7 @@ function Profile({ mobile, theme, logout, loading }) { style={styles.container} > - {/* */} + { ); }; -const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) => { +const Season = ({ + season, + activeUnit, + name, + setVideoActive, + mobile, + theme, +}) => { const navigation = useNavigation(); const Unit = ({ unit }) => { @@ -38,13 +45,17 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) => return ( color: activeUnit === unit ? "white" - : Colors.theme1.green79, + : theme === "light" + ? Colors.theme1.green79 + : Colors.theme1.white, }, ]} > @@ -82,12 +95,16 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) => color: activeUnit === unit ? "white" - : Colors.theme1.green79, + : theme === "light" + ? Colors.theme1.green79 + : Colors.theme1.white, borderRightWidth: 1, borderColor: activeUnit === unit ? "white" - : Colors.theme1.green79, + : theme === "light" + ? Colors.theme1.green79 + : Colors.theme1.white, paddingRight: 8, }, ]} @@ -109,7 +126,9 @@ const Season = ({ season, activeUnit, name, setVideoActive, mobile, theme }) => color: activeUnit === unit ? "white" - : Colors.theme1.green79, + : theme === "light" + ? Colors.theme1.green79 + : Colors.theme1.white, }} > نمایش @@ -134,7 +153,7 @@ const mapStateToProps = (state) => ({ vods: state.publicApi.bookSection?.vods, userid: state.user.status?.id, mobile: state.publicApi.mobile, - theme: state.publicApi.theme + theme: state.publicApi.theme, }); const mapDispatchToProps = { diff --git a/src/screens/VideoDisplay/index.js b/src/screens/VideoDisplay/index.js index e18d50e..e8c4cf1 100644 --- a/src/screens/VideoDisplay/index.js +++ b/src/screens/VideoDisplay/index.js @@ -66,7 +66,7 @@ function VideoDisplay({ route, mobile, theme }) { video.current.presentFullscreenPlayer()} + onLayout={() => setWidth(Dimensions.get("window").width)} > {!mobile ? : null} diff --git a/src/screens/Videos/index.js b/src/screens/Videos/index.js index 3a7eb8b..68c40d9 100644 --- a/src/screens/Videos/index.js +++ b/src/screens/Videos/index.js @@ -62,11 +62,11 @@ function Videos({ grades, videos, getVideos, mobile }) { style={[styles.container]} > {!mobile ? : null} - + /> */} {/* */} {videos.length ? ( <>