Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
Addy832 committed Dec 1, 2023
1 parent 92419c2 commit 8e00ee1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
12 changes: 7 additions & 5 deletions src/components/Mobile/HeaderMobile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -40,9 +45,6 @@ const HeaderMobile = ({ bg = "#0F4392", title, logo = false, search }) => {
}
});
}, []);
useEffect(() => {
dispatch(getProducts({ uses }));
}, [uses]);

return (
<header
Expand Down
9 changes: 6 additions & 3 deletions src/components/Products/Filter/Filter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ const Filter = ({ setuses }) => {
</div> */}

<div className="flex justify-between items-center gap-2">
<button className="border border-primary py-3 w-32 rounded-md font-bold bg-white text-primary">
<button
onClick={() => setuses("")}
className="border border-primary py-3 w-32 rounded-md font-bold bg-white text-primary"
>
{t["Clear All"]}
</button>
<button className="border border-primary py-3 w-32 rounded-md font-bold bg-primary text-white">
{/* <button className="border border-primary py-3 w-32 rounded-md font-bold bg-primary text-white">
{t["Apply"]}
</button>
</button> */}
</div>
</div>
);
Expand Down
9 changes: 8 additions & 1 deletion src/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en">
<Head />
<Head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="well-medic,pharmacy,drugs,medicine" />
<meta name="keywords" content="well-medic,pharmacy,drugs,medicine" />
<meta name="author" content="well-medic,pharmacy,drugs,medicine" />
</Head>
<body className="pb-[80px] lg:pb-0">
<Main />
<NextScript />
Expand Down
1 change: 1 addition & 0 deletions src/pages/products/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const Products = () => {
<HeaderMobile
bg="#0f4392"
btnBack={true}
setuses={setuses}
title={t["Our products"]}
search={true}
/>
Expand Down

0 comments on commit 8e00ee1

Please sign in to comment.