import { CloseOutlined, MenuOutlined } from "@ant-design/icons"; import { Button } from "@imphnen-frontend-service/ui/atoms"; import { cn, For, Show } from "@imphnen-frontend-service/utils"; import { motion, useMotionValueEvent, useScroll, Variants } from "framer-motion"; import { FC, useMemo, useState } from "react"; import { Link, NavLink, useLocation } from "react-router-dom"; const MENUS: { label: string; href: string }[] = [ { label: "Home", href: "/" }, { label: 'Mentoring', href: '/mentoring' }, { label: 'Resources', href: '/resources' }, { label: 'Articles', href: '/articles' }, ] export const Header: FC = () => { const location = useLocation(); const { scrollY } = useScroll() const [expandMenu, setExpandMenu] = useState(false); const [show, setShow] = useState(true) const headerVariants: Variants = { hidden: { opacity: 0, y: -100 }, show: { opacity: 1, y: 0 }, }; useMotionValueEvent(scrollY, "change", (latest) => { const prev = scrollY.getPrevious() || 0 if (latest > prev && latest > 100) setShow(false) else setShow(true) }) const isActive = useMemo(() => { return (path: string) => { if (path === '/' && location.pathname !== '/') return false return location.pathname.includes(path) } }, [location.pathname]); return (
IMPHNEN Logo
); }