diff --git a/src/components/Mobile/HeaderMobile.jsx b/src/components/Mobile/HeaderMobile.jsx index e4deb97..50217ce 100644 --- a/src/components/Mobile/HeaderMobile.jsx +++ b/src/components/Mobile/HeaderMobile.jsx @@ -18,7 +18,13 @@ import SwitchLang from "../Utilities/Lang/SwitchLang"; import { getProducts } from "@/toolkit/slices/products/productsSlice"; import { useDispatch } from "react-redux"; -const HeaderMobile = ({ bg = "#0F4392", title, logo = false, search }) => { +const HeaderMobile = ({ + bg = "#0F4392", + title, + logo = false, + search, + setuses, +}) => { const [isLogin, setIsLogin] = useState(true); const [isOpen, setIsOpen] = useState(false); const [showProfileList, setShowProfileList] = useState(false); @@ -30,7 +36,6 @@ const HeaderMobile = ({ bg = "#0F4392", title, logo = false, search }) => { useEffect(() => { localStorage.getItem("token") ? setIsLogin(true) : setIsLogin(false); }, []); - const [uses, setuses] = useState(""); useEffect(() => { // Handle open & close profile list @@ -40,9 +45,6 @@ const HeaderMobile = ({ bg = "#0F4392", title, logo = false, search }) => { } }); }, []); - useEffect(() => { - dispatch(getProducts({ uses })); - }, [uses]); return (
{ */}
- - + */}
); diff --git a/src/pages/_document.js b/src/pages/_document.js index c00188e..b9c42dd 100644 --- a/src/pages/_document.js +++ b/src/pages/_document.js @@ -3,7 +3,14 @@ import { Html, Head, Main, NextScript } from "next/document"; export default function Document() { return ( - + + + + + + + +
diff --git a/src/pages/products/index.jsx b/src/pages/products/index.jsx index 5285048..0f6b5a0 100644 --- a/src/pages/products/index.jsx +++ b/src/pages/products/index.jsx @@ -46,6 +46,7 @@ const Products = () => {