"use client"; import React from "react"; import Image from "next/image"; import { gsap } from "gsap"; import HeaderNav from "./HeaderNav"; /** * General Header for all pages */ const GeneralHeader = (): React.ReactElement => { const links: { title: string; url: string }[] = require("./links.json"); const [mobileNavOpen, setMobileNavOpen] = React.useState(false); /** * Animate the header on mount */ React.useEffect(() => { gsap.fromTo( "#main-header", { y: -20, filter: "blur(100px)", webkitFilter: "blur(100px)", opacity: 0, }, { y: 0, opacity: 1, duration: 1, filter: "none", webkitFilter: "none", delay: 0.5, } ); }, []); React.useEffect(() => { if (mobileNavOpen) { gsap.to("#mobile-nave-drawer", { opacity: 1, pointerEvents: "all", duration: 0.5, }); } else { gsap.to("#mobile-nave-drawer", { opacity: 0, pointerEvents: "none", duration: 0.5, }); } }, [mobileNavOpen]); return (
Logo
); }; export default GeneralHeader;