diff --git a/client/src/pages/FolxStadlPage.tsx b/client/src/pages/FolxStadlPage.tsx index f748164..1b64e28 100644 --- a/client/src/pages/FolxStadlPage.tsx +++ b/client/src/pages/FolxStadlPage.tsx @@ -100,7 +100,9 @@ export default function FolxStadlPage() { value={searchQuery} onChange={(e) => { setSearchQuery(e.target.value); - if (e.target.value) setLocation(`/?search=${encodeURIComponent(e.target.value)}`); + if (e.target.value) { + setLocation(`/?search=${encodeURIComponent(e.target.value)}`); + } }} className="bg-white border border-gray-300 rounded-lg px-4 py-2 pl-10 text-sm text-gray-900 placeholder-gray-500 focus:outline-none focus:border-bunny-blue transition-colors w-64" /> @@ -152,7 +154,12 @@ export default function FolxStadlPage() { type="search" placeholder="Search..." value={searchQuery} - onChange={(e) => setSearchQuery(e.target.value)} + onChange={(e) => { + setSearchQuery(e.target.value); + if (e.target.value) { + setLocation(`/?search=${encodeURIComponent(e.target.value)}`); + } + }} className="bg-white border border-gray-300 rounded-lg px-3 py-2 pl-9 text-sm text-gray-900 placeholder-gray-500 focus:outline-none focus:border-bunny-blue transition-colors w-full" />