From 52c8386b528c280e9982c234d9174060a18a1ca4 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:28:57 -0500 Subject: [PATCH] view more icon links to search for object type --- web/src/views/explore/ExploreView.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/web/src/views/explore/ExploreView.tsx b/web/src/views/explore/ExploreView.tsx index 5e6b211f0..eeeb639c4 100644 --- a/web/src/views/explore/ExploreView.tsx +++ b/web/src/views/explore/ExploreView.tsx @@ -66,10 +66,9 @@ function ThumbnailRow({ const navigate = useNavigate(); const [hoveredIndex, setHoveredIndex] = useState(null); - const handleSimilaritySearch = (eventId: string) => { + const handleSearch = (label: string) => { const similaritySearchParams = new URLSearchParams({ - search_type: "similarity", - event_id: eventId, + labels: label, }).toString(); navigate(`/explore?${similaritySearchParams}`); }; @@ -110,11 +109,7 @@ function ThumbnailRow({ ))}
- events && - events.length > 0 && - handleSimilaritySearch(events[events.length - 1].id) - } + onClick={() => handleSearch(objectType)} > @@ -124,7 +119,9 @@ function ThumbnailRow({ /> - View More + + Explore More {objectType}s +