"use client"; import React, { useState, useEffect } from "react"; import Link from "next/link"; import Image from "next/image"; import { usePathname } from "next/navigation"; import classnames from "classnames"; import Reserve from "./reserveButton"; import "./NavBar.css"; import { GiHamburgerMenu } from "react-icons/gi"; import { AiOutlineInstagram, AiOutlineFacebook } from "react-icons/ai"; import { FaTiktok } from "react-icons/fa"; import { RiCellphoneLine } from "react-icons/ri"; import { FaPhone } from "react-icons/fa6"; import StoreHours from "../StoreHours/StoreHours"; import { Button } from "@/components/ui/button"; import { IoLocationSharp } from "react-icons/io5"; import { IoIosMail } from "react-icons/io"; const NavBar = () => { const currentPath = usePathname(); // console.log(currentPath); const [menu_open, set_menu_open] = useState(false); const [navbar, setNavbar] = useState(false); const handleNav = () => { set_menu_open(!menu_open); }; // Create an array to hold the list items const links = [ { label: "HOME", href: "/" }, { label: "MENU", href: "/menu" }, // { label: "GALLERY", href: "/gallery" }, { label: "ABOUT", href: "/about-us" }, { label: "CONTACT", href: "/contact" }, ]; // Create an array to hold the list items const links2 = [ { label: "ABOUT", href: "/about-us" }, // { label: "REVIEWS", href: "/reviews" }, { label: "CONTACT", href: "/contact" }, // { label: "Dashboard", href: "/dashboard" }, { label: "RESERVE", href: "/reservations" }, // { label: "Issues", href: "/issues" }, ]; const changeBackground = () => { // console.log(window.scrollY); if (window.scrollY >= 120) { setNavbar(true); } else { setNavbar(false); } }; if (typeof window !== "undefined") { // Your client-side code that uses window goes here window.addEventListener("scroll", changeBackground); } return ( ); }; export default NavBar;