import { useCallback, useState } from "react"; import { useTranslation } from "react-i18next"; import Sticky from "react-stickynode"; import { ThinContainer } from "@/components/layout/ThinContainer"; import { SearchBarInput } from "@/components/SearchBar"; import { Title } from "@/components/text/Title"; import { useBannerSize } from "@/hooks/useBanner"; import { useSearchQuery } from "@/hooks/useSearchQuery"; export interface HeroPartProps { setIsSticky: (val: boolean) => void; searchParams: ReturnType; } export function HeroPart({ setIsSticky, searchParams }: HeroPartProps) { const { t } = useTranslation(); const [search, setSearch, setSearchUnFocus] = searchParams; const [, setShowBg] = useState(false); const bannerSize = useBannerSize(); const stickStateChanged = useCallback( ({ status }: Sticky.Status) => { const val = status === Sticky.STATUS_FIXED; setShowBg(val); setIsSticky(val); }, [setShowBg, setIsSticky] ); return (
{t("search.title")}
); }