'use client'; import React, { useEffect, useState } from 'react'; import Link from 'next/link'; import { LiveSearch } from '../components/store/LiveSearch'; import { HeaderActions } from './HeaderActions'; /** Shared sticky threshold for Header + Navbar so they lock together. */ export const STOREFRONT_STICKY_SCROLL_Y = 10; /** White gap between the sticky header and nav after scroll. */ export const STOREFRONT_STICKY_NAV_GAP_PX = 10; export const Header: React.FC = () => { const [isSticky, setIsSticky] = useState(false); useEffect(() => { const onScroll = () => setIsSticky(window.scrollY > STOREFRONT_STICKY_SCROLL_Y); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); return (
iFix Kart
); };