diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index c02a01f..197166c 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { connect } from "react-redux"; +import {publicApi} from "../../redux/actions"; import _ from "lodash"; import Drawer from "../Drawer"; import Search from "../Search"; @@ -29,10 +30,10 @@ import bookmarkDeactiveDarkIcon from "../../assets/icons/bookmark-deactive-dark. import dotsMenuLightIcon from "../../assets/icons/dots-menu-light.svg"; import bookmarkDeactiveLightIcon from "../../assets/icons/bookmark-deactive-light.svg"; - function Navbar({ pages, isDark, + changeDarkMode, isMobile, isLogin, headerOptions, @@ -86,6 +87,20 @@ function Navbar({ }); } }, []); + + let tapedTwice = false; + const doubleTap = (event) => { + if (!tapedTwice) { + tapedTwice = true; + setTimeout(function () { + tapedTwice = false; + }, 300); + return false; + } + event.preventDefault(); + //action on double tap goes below + changeDarkMode(!isDark); + }; return isMobile ? (
+ کاربر گرامی لطفا یکی از دوگزینه زیر را انتخاب نمائید.
+
درصورتی که عضو نیستید روی دکمه ثبت نام بزنید
+