/* eslint-disable no-unused-vars */
import {
Box,
Button,
Container,
Icon,
Image,
Stack,
Switch,
useColorMode,
VStack,
} from "@chakra-ui/react";
import { Outlet, Link, useLocation, NavLink } from "react-router-dom";
import logo from "../../assets/images/rubix.png";
import logoLight from "../../assets/images/light-logo.png";
import { useEffect, useState } from "react";
import SwitchBtn from "../SwitchBtn/SwitchBtn";
const NavBar = () => {
// const [isHoveredCommunity, setIsHoveredCommunity] = useState(false);
const [windowWidth, setWindowWidth] = useState(window.innerWidth);
const { colorMode, toggleColorMode } = useColorMode();
const [isSwitchOn, setIsSwitchOn] = useState(true);
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 theme = localStorage?.getItem("light");
return (
<>
({
fontSize: "14px",
fontWeight: "400",
borderBottom: isActive ? "1px solid #DE858E" : "0px solid #fff", // Active style for MAIN NET
})}
>
MAIN NET
({
fontSize: "14px",
fontWeight: "400",
borderBottom: isActive ? "1px solid #DE858E" : "0px solid #fff", // Active style for SUBNETS
})}
>
SUBNETS
{/* */}
>
);
};
export default NavBar;