From 4c68c09966c86b04e73352c17c299fb5e11acf52 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Wed, 13 Jul 2022 13:57:47 +0430 Subject: [PATCH] update 24 files --- src/components/Dots/index.js | 24 +++------ src/components/Input/index.js | 1 - src/components/MainFooter/index.js | 1 - src/components/Navbar/index.js | 21 ++++---- src/components/Search/index.js | 16 ++---- src/components/Textarea/index.js | 9 +--- .../VerticalExpandableProductFilter/index.js | 33 +++++------- src/views/About/index.js | 13 +++-- src/views/Auth/SignUp/index.js | 6 ++- .../layouts/Mobile/ProfileAddress/index.js | 2 - .../Home/Landscape/Page1/Lights/index.js | 20 +++++--- src/views/Home/Landscape/Page1/index.js | 31 +++++------- .../Landscape/Page2/Mobile/QrResult/index.js | 46 ++++++++--------- .../Landscape/Page2/Mobile/Video/index.js | 32 ++++++------ .../Home/Landscape/Page2/Mobile/index.js | 50 ++++++------------- src/views/Home/Landscape/Page2/index.js | 39 ++++++--------- src/views/Home/Landscape/Page3/index.js | 25 ++++------ src/views/Home/Landscape/Page4/index.js | 27 +++++----- src/views/Home/Landscape/Test/Question.js | 23 ++------- src/views/Home/Landscape/Test/index.js | 12 +++-- .../VideoTube/LessonPlayList/index.js | 16 ++---- src/views/Home/Landscape/VideoTube/index.js | 29 ++++------- .../Home/Portrait/Private/Blogs/index.js | 3 +- src/views/Products/layouts/Mobile/Header.js | 6 +-- 24 files changed, 193 insertions(+), 292 deletions(-) diff --git a/src/components/Dots/index.js b/src/components/Dots/index.js index 57dc57a..f965861 100644 --- a/src/components/Dots/index.js +++ b/src/components/Dots/index.js @@ -1,15 +1,11 @@ import React, { useState, useEffect } from "react"; -import _ from "lodash"; export default function Dots() { const [scroll, setScroll] = useState(null); const [active, setActive] = useState(null); const height = window.innerHeight; useEffect(() => { - window.addEventListener( - "scroll", - _.debounce(() => setScroll(window.scrollY), 20) - ); + window.addEventListener(setScroll(window.scrollY), 20); }, []); useEffect(() => { @@ -67,21 +63,17 @@ const Dot = ({ value, active, index, setActive }) => { }; return (
click()} >
); diff --git a/src/components/Input/index.js b/src/components/Input/index.js index b25482e..b0af933 100644 --- a/src/components/Input/index.js +++ b/src/components/Input/index.js @@ -1,5 +1,4 @@ import React, { useState } from "react"; -import _ from "lodash"; export default function Input(props) { const [focusToggle, setFocusToggle] = useState(false); diff --git a/src/components/MainFooter/index.js b/src/components/MainFooter/index.js index dee1fce..a4a4849 100644 --- a/src/components/MainFooter/index.js +++ b/src/components/MainFooter/index.js @@ -1,6 +1,5 @@ import React from "react"; import { Link } from "react-router-dom"; -import _ from "lodash"; import enamadlogo from "./enamad-pic.svg"; import callIcon from "../../assets/icons/vuesax-linear-call-calling.svg"; diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index ce3a724..b775fb6 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -3,7 +3,6 @@ import { Link, useNavigate, NavLink } from "react-router-dom"; import { connect } from "react-redux"; import { userProduct, userFavorite } from "../../redux/actions"; import location from "../../utils/location"; -import _ from "lodash"; //components import Drawer from "../Drawer"; @@ -79,7 +78,6 @@ function Navbar({ useEffect(() => { if (!isMobile && user) { - getCartProducts(); } }, [user]); @@ -91,9 +89,12 @@ function Navbar({ backgroundColor: !top ? (isDark ? "#061B30" : "white") : "white", }} > -
+
{/* desktop */}
@@ -214,9 +215,7 @@ function Navbar({ ) : isActiveBookmark ? ( bookmark @@ -331,7 +330,7 @@ const mapDispatchToProps = { getCartProducts: userProduct.list, addToFavorite: userFavorite.add, deleteBookmark: userFavorite.del, - getUserFavorite: userFavorite.list + getUserFavorite: userFavorite.list, }; export default connect(mapStateToProps, mapDispatchToProps)(Navbar); diff --git a/src/components/Search/index.js b/src/components/Search/index.js index 255e2c1..8b2e416 100644 --- a/src/components/Search/index.js +++ b/src/components/Search/index.js @@ -1,7 +1,6 @@ import React from "react"; import { connect } from "react-redux"; import { publicApi } from "../../redux/actions"; -import _ from "lodash"; //assets import searchIcon from "./search.png"; @@ -15,13 +14,9 @@ function Search(props) {