import Area from '@components/common/Area.js'; import { useSearch } from '@components/frontStore/catalog/SearchContext.js'; import { _ } from '@evershop/evershop/lib/locale/translate/_'; import { Search } from 'lucide-react'; import React from 'react'; export function SearchInfo() { const { keyword, products } = useSearch(); const count = products?.total ?? 0; // One key per plural form, with both the count and the keyword interpolated, so a // translator controls word order, the quote style (« » in fr, „“ in de) and where the // number sits — ru/sr use a trailing "…: N" counter form that stays grammatical for // every number, which a 2-form split alone cannot express. `_()` leaves ${keyword} // untouched (it is absent from the values), so we split on it to keep the keyword in // its own muted . const heading = count === 1 ? _('${count} result for “${keyword}”', { count: String(count) }) : _('${count} results for “${keyword}”', { count: String(count) }); const [headingBefore, headingAfter = ''] = heading.split('${keyword}'); return ( <> {/* Inline search box (reference): a plain GET form that re-runs the existing /search route, so shoppers can refine without the header overlay. No new API — same `keyword` param the page already reads. */}
{/* Re-skin (2026-07-10): "N results for " (reference). Content is already inside .page-width via Base, so no nested page-width here. */}

{headingBefore} {keyword} {headingAfter}

); }