From e90cea120dcfd88bc85da57b30849fcf29c14e77 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Wed, 20 Oct 2021 17:11:52 +0330 Subject: [PATCH] reza added payment --- src/components/GradeFilter/index.tsx | 14 +++++-- src/components/HomeSearchBox/index.scss | 13 ++++--- src/components/HomeSearchBox/index.tsx | 2 +- src/components/Navbar/index.scss | 1 + src/components/NavbarDrawer/NavbarDrawer.scss | 13 ++++++- src/redux/actions-type/index.tsx | 1 + src/redux/actions-type/userFactor.tsx | 4 +- src/redux/actions-type/userProduct.tsx | 20 ++++++++++ src/redux/actions/userFactor.tsx | 10 +++-- src/redux/actions/userProduct.tsx | 2 +- src/redux/reducers/index.tsx | 2 + src/redux/reducers/public.tsx | 5 ++- src/redux/reducers/userFactor.tsx | 4 +- src/redux/reducers/userProduct.tsx | 20 ++++++++++ src/views/Home/index.tsx | 24 ++++++++---- .../Subscription/SubscribeRadio/index.tsx | 38 ++++++++++++------- src/views/Subscription/index.tsx | 15 +++++--- src/views/VideoTube/AddComment/index.tsx | 2 +- src/views/VideoTube/index.tsx | 28 +++++++------- 19 files changed, 156 insertions(+), 62 deletions(-) create mode 100644 src/redux/actions-type/userProduct.tsx create mode 100644 src/redux/reducers/userProduct.tsx diff --git a/src/components/GradeFilter/index.tsx b/src/components/GradeFilter/index.tsx index e17fb83..9d0adeb 100644 --- a/src/components/GradeFilter/index.tsx +++ b/src/components/GradeFilter/index.tsx @@ -6,15 +6,20 @@ import "./index.scss"; import dropdown from "../../assets/icons/dropdown.png"; -function GradeFilter({selectedGrade, gradeFilter, grades}: any) { +function GradeFilter({selectedGrade, gradeFilter, grades, gradeDropdown, setGradeDropdown}: any) { const [arrowTop, setArrowTop] = useState(false); useEffect(() => { - setArrowTop(false); + setGradeDropdown(false); }, [selectedGrade]); const mobileList = useRef(null); + const setDropdown = (e : any) => { + e.stopPropagation(); + setGradeDropdown(!gradeDropdown); + } + return (

@@ -23,7 +28,7 @@ function GradeFilter({selectedGrade, gradeFilter, grades}: any) {

setArrowTop(!arrowTop)} + onClick={(e : any) => setDropdown(e)} > {selectedGrade ? (

{grades[selectedGrade - 1].name}

@@ -33,9 +38,10 @@ function GradeFilter({selectedGrade, gradeFilter, grades}: any) {
- {arrowTop ? ( + {gradeDropdown ? (
    {grades.map((item: any, i: any) => (
  • -