import React, { useEffect } from "react"; import { BrowserRouter, Routes, Route } from "react-router-dom"; import { connect } from "react-redux"; import { publicApi } from "./redux/actions"; import Navbar from "./components/Navbar"; import BG from "./components/BG"; import BottomNavigation from "./components/BottomNavigation"; import _ from "lodash"; import Home from "./views/Home"; import Auth from "./views/Auth"; import Products from "./views/Products"; import Product from "./views/Product"; import ShoppingCart from "./views/ShoppingCart"; import DeliveryForm from "./views/DeliveryForm"; import Videos from "./views/Videos"; import Video from "./views/Video"; import VideoDisplay from "./views/VideoDisplay"; import QR from "./views/QR"; import NotFound from "./views/404"; import Orders from "./views/Orders"; import Order from "./views/Order"; import Activation from "./views/Activation"; import Faq from "./views/Faq"; import Contact from "./views/Contact"; import Dashboard from "./views/Dashboard"; // import VideoTube from "./views/Home/VideoTube"; function Router({ isDark, isMobile, isLogin, headerOptions, setDesktopContentTransform, }) { useEffect(() => { window.addEventListener("scroll", () => { // if (!isMobile) { // window.addEventListener("scroll", () => { // if (window.scrollY >= 64) { // setDesktopContentTransform(true); // } else { // setDesktopContentTransform(false); // } // }); // } }); }, []); return (