diff --git a/components/shared/blog-header.jsx b/components/shared/blog-header.jsx
index 590363f..aaddfbc 100644
--- a/components/shared/blog-header.jsx
+++ b/components/shared/blog-header.jsx
@@ -3,6 +3,7 @@
import Image from 'next/image';
import Link from "next/link"
import { MdMenu, MdOutlineKeyboardArrowDown } from "react-icons/md"
+// import { useSelectedLayoutSegment } from "next/navigation";
import React, { useState, useRef, useEffect } from "react";
const links = [
@@ -39,18 +40,19 @@ const links = [
];
export default function Header() {
- const [showResource, setShowResource] = useState(false)
+ // const segment = useSelectedLayoutSegment();
+ const [showResource, setShowResource] = useState(false);
- const [isOpen, setIsOpen] = useState(false);
+ const [isOpen, setisOpen] = useState(false);
const dropdownRef = useRef(null);
- const toggleDropdown = () => {
- setIsOpen(!isOpen);
+ const toggleMenu = () => {
+ setisOpen(!isOpen);
};
const handleOutsideClick = (event) => {
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
- setIsOpen(false);
+ setisOpen(false);
}
};
@@ -72,7 +74,7 @@ export default function Header() {
(
idx !== 2 ? (
{link.text}
) : (
setShowResource(showResource => !showResource)}
@@ -107,20 +109,20 @@ export default function Header() {
Request Demo
-
-
-
+ )}
diff --git a/components/shared/header.jsx b/components/shared/header.jsx
index c94a791..8623554 100644
--- a/components/shared/header.jsx
+++ b/components/shared/header.jsx
@@ -41,23 +41,18 @@ const links = [
export default function Header() {
const segment = useSelectedLayoutSegment();
- const [showResource, setShowResource] = useState(false)
- const [menuOpen, setMenuOpen] = useState(false);
+ const [showResource, setShowResource] = useState(false);
- const toggleMenu = () => {
- setMenuOpen(!menuOpen);
- };
-
- const [isOpen, setIsOpen] = useState(false);
+ const [isOpen, setisOpen] = useState(false);
const dropdownRef = useRef(null);
- const toggleDropdown = () => {
- setIsOpen(!isOpen);
+ const toggleMenu = () => {
+ setisOpen(!isOpen);
};
const handleOutsideClick = (event) => {
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
- setIsOpen(false);
+ setisOpen(false);
}
};
@@ -113,24 +108,14 @@ export default function Header() {
-
-
-
- {menuOpen && (
-