import { useEffect, useRef } from 'react' import styles from '@/components/header.module.css' import { Container, Nav, Navbar } from 'react-bootstrap' import { NavPrice, MeCorner, AnonCorner, SearchItem, Back, NavWalletSummary, Brand, SignUpButton } from './common' import { useMe } from '@/components/me' import classNames from 'classnames' export default function StickyBar ({ prefix, sub, path, topNavKey, dropNavKey }) { const ref = useRef() const me = useMe() useEffect(() => { const stick = () => { if (window.scrollY > 100) { ref.current?.classList.remove(styles.hide) } else { ref.current?.classList.add(styles.hide) } } window.addEventListener('scroll', stick) return () => { window.removeEventListener('scroll', stick) } }, [ref?.current]) return (