Skip to content

Commit

Permalink
Only show species checkmark for species or lower (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtklein authored Mar 18, 2024
1 parent 3430406 commit 19d5705
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/components/Explore/TaxonGridItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ const TaxonGridItem = ( {
testID={`TaxonGridItem.${taxon.id}`}
iconicTaxonName={taxon.iconic_taxon_name}
>
<View className="absolute top-3 left-3">
<SpeciesSeenCheckmark taxonId={taxon.id} />
</View>
{taxon.rank_level <= 10 && (
<View className="absolute top-3 left-3">
<SpeciesSeenCheckmark taxonId={taxon.id} />
</View>
)}

<View className="absolute bottom-0 flex p-2 w-full">
<DisplayTaxonName
keyBase={taxon?.id}
Expand Down
9 changes: 6 additions & 3 deletions src/components/TaxonDetails/TaxonDetailsTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Props = {
optionalClasses?: any,
taxon?: {
rank: string,
rank_level: number,
id: number
}
}
Expand All @@ -35,9 +36,11 @@ const TaxonDetailsTitle = ( {
<Heading4 className={optionalClasses}>
{t( `Ranks-${taxon.rank.toUpperCase( )}` )}
</Heading4>
<View className="ml-3">
<SpeciesSeenCheckmark taxonId={taxon.id} />
</View>
{taxon.rank_level <= 10 && (
<View className="ml-3">
<SpeciesSeenCheckmark taxonId={taxon.id} />
</View>
)}
</View>
) }
<DisplayTaxonName
Expand Down

0 comments on commit 19d5705

Please sign in to comment.