Improve search functionality and update image links
Refactors navigation to use wouter for single-page application behavior, resolving issues with search query parsing and duplicate declarations. Updates image URLs in `gallery-data.json`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 3d4c4d6f-16fc-4faa-8264-303195c3f560 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/jdAEdU5 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -29,11 +29,11 @@ export default function Header() {
|
||||
const handleSearch = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (searchQuery.trim().length >= 2) {
|
||||
const url = `/search?q=${encodeURIComponent(searchQuery.trim())}`;
|
||||
const q = encodeURIComponent(searchQuery.trim());
|
||||
setSearchOpen(false);
|
||||
setSearchQuery("");
|
||||
setMobileOpen(false);
|
||||
window.location.href = url;
|
||||
navigate(`/search?q=${q}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user