diff --git a/frontend/application/components/MobileBottomNav.tsx b/frontend/application/components/MobileBottomNav.tsx index 24127994..20b1f54d 100644 --- a/frontend/application/components/MobileBottomNav.tsx +++ b/frontend/application/components/MobileBottomNav.tsx @@ -238,7 +238,6 @@ export default function MobileBottomNav({ value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} className="w-full bg-medical-gray-50 border border-medical-gray-200 rounded-xl py-2.5 pr-10 pl-14 text-xs outline-none focus:border-canina-blue font-vazir text-medical-gray-900" - autoFocus /> -
-
-

- نتایج جستجو برای: "{query}" +
+
+

+ {query ? ( + <>نتایج جستجو برای: "{query}" + ) : ( + "جستجوی هوشمند در محصولات و مکمل‌های کنینا" + )}

-

- {results.length} محصول با معیارهای شما مطابقت دارد. +

+ {query + ? `${results.length} محصول با معیارهای شما مطابقت دارد.` + : "نام دارو، ترکیب مؤثره، علامت بیماری یا مشکل پت خود را جستجو کنید."}

+ + {/* Direct Interactive Search Box */} +
{ + e.preventDefault(); + const form = e.currentTarget; + const input = form.elements.namedItem("q") as HTMLInputElement; + if (input && input.value.trim()) { + router.push(`/search?q=${encodeURIComponent(input.value.trim())}`); + } + }} + className="relative max-w-xl" + > + + + +
@@ -73,12 +107,12 @@ export default function SearchResultsPage({ query }: { query: string }) { className="bg-white rounded-[2.5rem] p-8 border border-medical-gray-200 group hover:shadow-2xl hover:shadow-canina-blue/10 transition-all flex flex-col relative h-full block" >
- {product.nameFa {product.specialBadge && ( @@ -88,7 +122,7 @@ export default function SearchResultsPage({ query }: { query: string }) { )} {compatibility && (
{compatibility.type === 'alert' ? : compatibility.type === 'success' ? : } @@ -96,7 +130,7 @@ export default function SearchResultsPage({ query }: { query: string }) {
)}
- +
{product.category}

{product.nameFa || product.name}