From 7a487c1aa94edf2c85161617ef704849fa291d5c Mon Sep 17 00:00:00 2001 From: Abbey Campbell Date: Fri, 10 Jul 2026 11:41:54 -0700 Subject: [PATCH 1/2] move and rename ExploreSearchHeader -> SearchHeader --- .../Explore/ExploreV2/screens/UniversalSearch.tsx | 4 ++-- .../Explore/SearchScreens/ExploreLocationSearch.tsx | 4 ++-- .../Explore/SearchScreens/ExploreProjectSearch.tsx | 4 ++-- src/components/Explore/SearchScreens/ExploreTaxonSearch.js | 5 ++--- src/components/Explore/SearchScreens/ExploreUserSearch.js | 4 ++-- .../MyObservations/Search/SearchMyObservationsTaxon.tsx | 7 ++----- .../SearchHeader.tsx} | 4 ++-- src/components/SharedComponents/index.ts | 1 + 8 files changed, 15 insertions(+), 18 deletions(-) rename src/components/{Explore/SearchScreens/ExploreSearchHeader.tsx => SharedComponents/SearchHeader.tsx} (95%) diff --git a/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx b/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx index 4ba27c032..631de0550 100644 --- a/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx +++ b/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx @@ -17,9 +17,9 @@ import type { UniversalSearchResultItem } from "components/Explore/ExploreV2/hooks/useUniversalSearch"; import useUniversalSearch from "components/Explore/ExploreV2/hooks/useUniversalSearch"; import EmptySearchResults from "components/Explore/SearchScreens/EmptySearchResults"; -import ExploreSearchHeader from "components/Explore/SearchScreens/ExploreSearchHeader"; import ContainedSquareButton from "components/SharedComponents/Buttons/ContainedSquareButton"; import INatIcon from "components/SharedComponents/INatIcon"; +import SearchHeader from "components/SharedComponents/SearchHeader"; import Body3 from "components/SharedComponents/Typography/Body3"; import ViewWrapper from "components/SharedComponents/ViewWrapper"; import { @@ -210,7 +210,7 @@ const UniversalSearch = ( ) => { return ( - - { return ( - - { return ( - { return ( - Date: Fri, 10 Jul 2026 11:56:25 -0700 Subject: [PATCH 2/2] make prop names more generic --- .../Explore/ExploreV2/screens/UniversalSearch.tsx | 4 ++-- .../Explore/SearchScreens/ExploreLocationSearch.tsx | 4 ++-- .../Explore/SearchScreens/ExploreProjectSearch.tsx | 4 ++-- .../Explore/SearchScreens/ExploreTaxonSearch.js | 4 ++-- .../Explore/SearchScreens/ExploreUserSearch.js | 4 ++-- .../Search/SearchMyObservationsTaxon.tsx | 4 ++-- src/components/SharedComponents/SearchHeader.tsx | 12 ++++++------ 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx b/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx index 631de0550..8fcbd4ab0 100644 --- a/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx +++ b/src/components/Explore/ExploreV2/screens/UniversalSearch.tsx @@ -212,8 +212,8 @@ const UniversalSearch = ( ) => { diff --git a/src/components/Explore/SearchScreens/ExploreLocationSearch.tsx b/src/components/Explore/SearchScreens/ExploreLocationSearch.tsx index caa599ad9..2027c74b7 100644 --- a/src/components/Explore/SearchScreens/ExploreLocationSearch.tsx +++ b/src/components/Explore/SearchScreens/ExploreLocationSearch.tsx @@ -153,9 +153,9 @@ const ExploreLocationSearch = ( { return ( { return ( { return ( { return ( diff --git a/src/components/SharedComponents/SearchHeader.tsx b/src/components/SharedComponents/SearchHeader.tsx index fb03524ea..009f7c2b9 100644 --- a/src/components/SharedComponents/SearchHeader.tsx +++ b/src/components/SharedComponents/SearchHeader.tsx @@ -9,17 +9,17 @@ import React from "react"; import { useTranslation } from "sharedHooks"; interface Props { - closeModal: ( ) => void; + onClose: ( ) => void; headerText: string; - resetFilters: ( ) => void; + onReset: ( ) => void; resetDisabled?: boolean; testID: string; } const SearchHeader = ( { - closeModal, + onClose, headerText, - resetFilters, + onReset, resetDisabled = false, testID, }: Props ) => { @@ -30,7 +30,7 @@ const SearchHeader = ( { @@ -40,7 +40,7 @@ const SearchHeader = ( { "w-[50px] items-end", { "opacity-50": resetDisabled }, )} - onPress={resetFilters} + onPress={onReset} disabled={resetDisabled} accessibilityRole="button" accessibilityLabel={t( "Reset-verb" )}