mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-05 06:05:12 -04:00
Remove binoculars from Explore SpeciesView (#2689)
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
This commit is contained in:
committed by
GitHub
parent
18af8a4918
commit
42e9b6bb2e
@@ -169,7 +169,6 @@ const Explore = ( {
|
||||
{currentExploreView === "species" && (
|
||||
<SpeciesView
|
||||
canFetch={canFetch}
|
||||
setCurrentExploreView={setCurrentExploreView}
|
||||
isConnected={isConnected}
|
||||
queryParams={queryParams}
|
||||
handleUpdateCount={handleUpdateCount}
|
||||
|
||||
@@ -1,28 +1,18 @@
|
||||
import { INatIcon } from "components/SharedComponents";
|
||||
import type { Props as TaxonGridItemProps } from "components/SharedComponents/TaxonGridItem";
|
||||
import TaxonGridItem from "components/SharedComponents/TaxonGridItem.tsx";
|
||||
import { Pressable } from "components/styledComponents";
|
||||
import {
|
||||
EXPLORE_ACTION,
|
||||
useExplore
|
||||
} from "providers/ExploreContext.tsx";
|
||||
import React from "react";
|
||||
import { useTranslation } from "sharedHooks";
|
||||
import colors from "styles/tailwindColors";
|
||||
|
||||
interface Props extends TaxonGridItemProps {
|
||||
count?: number;
|
||||
setCurrentExploreView: ( exploreView: "observations" ) => void
|
||||
}
|
||||
|
||||
const ExploreTaxonGridItem = ( {
|
||||
count,
|
||||
showSpeciesSeenCheckmark = false,
|
||||
style,
|
||||
taxon,
|
||||
setCurrentExploreView
|
||||
taxon
|
||||
}: Props ) => {
|
||||
const { dispatch } = useExplore( );
|
||||
const { t } = useTranslation( );
|
||||
return (
|
||||
<TaxonGridItem
|
||||
@@ -34,23 +24,6 @@ const ExploreTaxonGridItem = ( {
|
||||
showSpeciesSeenCheckmark={showSpeciesSeenCheckmark}
|
||||
style={style}
|
||||
taxon={taxon}
|
||||
upperRight={count && (
|
||||
<Pressable
|
||||
accessibilityRole="button"
|
||||
onPress={( ) => {
|
||||
if ( !( taxon?.id && taxon?.name ) ) return;
|
||||
dispatch( {
|
||||
type: EXPLORE_ACTION.CHANGE_TAXON,
|
||||
taxon: { id: taxon.id },
|
||||
taxonId: taxon?.id,
|
||||
taxonName: taxon?.preferred_common_name || taxon?.name
|
||||
} );
|
||||
setCurrentExploreView( "observations" );
|
||||
}}
|
||||
>
|
||||
<INatIcon name="observations" size={15} color={String( colors?.white )} dropShadow />
|
||||
</Pressable>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,7 +22,6 @@ type Props = {
|
||||
canFetch?: boolean,
|
||||
isConnected: boolean,
|
||||
queryParams: Object,
|
||||
setCurrentExploreView: Function,
|
||||
handleUpdateCount: Function
|
||||
}
|
||||
|
||||
@@ -30,7 +29,6 @@ const SpeciesView = ( {
|
||||
canFetch,
|
||||
isConnected,
|
||||
queryParams,
|
||||
setCurrentExploreView,
|
||||
handleUpdateCount
|
||||
}: Props ): Node => {
|
||||
// 20240814 - amanda: not sure if we actually need observedTaxonIds in state in the long
|
||||
@@ -131,7 +129,6 @@ const SpeciesView = ( {
|
||||
|
||||
return (
|
||||
<ExploreTaxonGridItem
|
||||
setCurrentExploreView={setCurrentExploreView}
|
||||
key={itemKey}
|
||||
count={item?.count}
|
||||
style={gridItemStyle}
|
||||
|
||||
Reference in New Issue
Block a user