/* eslint-disable no-unused-vars */ import { Box, Image, Popover, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, PopoverFooter, PopoverArrow, PopoverCloseButton, PopoverAnchor, Button, } from "@chakra-ui/react"; import { Outlet, Link, useLocation } from "react-router-dom"; import { useEffect, useState } from "react"; import logo from "../../assets/images/rubix.png"; import { MobileMenu } from "../MobileMenu/MobileMenu"; import arrow from "../../assets/images/arrow.png"; import learnIcon from "../../assets/images/Navicons/learnNav.png"; import pledgeIcon from "../../assets/images/Navicons/pledgeIcon.png"; import contractIcon from "../../assets/images/Navicons/contractIcon.png"; import tokenIcon from "../../assets/images/Navicons/contractIcon.png"; import buildIcon from "../../assets/images/Navicons/buildIcon.png"; import nodeIcon from "../../assets/images/Navicons/nodeIcon.png"; import quorumIcon from "../../assets/images/Navicons/quorumIcon.png"; import subnetsIcon from "../../assets/images/Navicons/subnetsIcon.png"; import fintechIcon from "../../assets/images/Navicons/fintechIcon.png"; import adTech from "../../assets/images/Navicons/adTech.png"; import marTech from "../../assets/images/Navicons/marTech.png"; import healthTech from "../../assets/images/Navicons/healthTech.png"; const NavBar = () => { const [isScrolled, setIsScrolled] = useState(false); const [isHoveredLearn, setIsHoveredLearn] = useState(false); const [isHoveredBuild, setIsHoveredBuild] = useState(false); const [isHoveredCases, setIsHoveredCases] = useState(false); // const [isHoveredCommunity, setIsHoveredCommunity] = useState(false); const [windowWidth, setWindowWidth] = useState(window.innerWidth); const location = useLocation(); const linkStyle = { width: "0", }; const active = { content: "''", position: "absolute", bottom: "0px", left: "50%", width: "100%", height: "3px", backgroundColor: "#DE858E", borderRadius: "10px", transform: "translateX(-50%)", transition: "all .3s", }; const highlight = { color: "rgb(222, 133, 142)", }; const normal = { color: "#fff", }; const iconwidth = "50px"; useEffect(() => { const handleScroll = () => { const scrollPosition = window.scrollY; setIsScrolled(scrollPosition > 0); }; const handleResize = () => { setWindowWidth(window.innerWidth); }; window.addEventListener("scroll", handleScroll); window.addEventListener("resize", handleResize); return () => { window.removeEventListener("scroll", handleScroll); window.removeEventListener("resize", handleResize); }; }, []); const isMobile = windowWidth <= 996; return ( <> {!isMobile ? ( <> WALLET EXPLORER setIsHoveredLearn(false)} > setIsHoveredLearn(true)} onMouseLeave={() => setIsHoveredLearn(false)} _focus={{ boxShadow: "none", }} > Learn Proof-of-pledge Protocol Smart contracts Tokenomics in Rubix setIsHoveredBuild(false)} > setIsHoveredBuild(true)} onMouseLeave={() => setIsHoveredBuild(false)} > Build Set up Rubix Node Quorum Subnets setIsHoveredCases(false)} > setIsHoveredCases(true)} onMouseLeave={() => setIsHoveredCases(false)} > FinTech AdTech MarTech HealthTech {/* setIsHoveredCommunity(false)} > setIsHoveredCommunity(true)} onMouseLeave={() => setIsHoveredCommunity(false)} > Community News & Articles MarTech HealthTech */} {/* */} { const arrowRight = document.querySelector(".arrow"); arrowRight.style.transform = "rotate(45deg)"; }} onMouseLeave={(e) => { const arrowRight = document.querySelector(".arrow"); arrowRight.style.transform = "none"; }} > ) : ( )} ); }; export default NavBar;